﻿using System;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel;
using Titan;
using Titan.MySql;
using Titan.SQLite;
using Titan.SqlServer;
using Titan.Oracle;
using System.ComponentModel.DataAnnotations;


namespace yao.Entity
{
    
    public class EntityList<T> 
    { 
        private List<T> _items =   new List<T>();

        public long TotalCount{ get; set; }

        public List<T> Items {
            get { return _items;}
            set { _items = value;}
        }
          
    }
/*
<system.runtime.serialization>
    <dataContractSerializer>
      <declaredTypes>
        <knownType type="ledinghuo.website.Entity.DeliveryStatus, ledinghuo.website.Entity"/> 
        <knownType type="ledinghuo.website.Entity.SettleStatus, ledinghuo.website.Entity"/> 
        <knownType type="ledinghuo.website.Entity.CompanyType, ledinghuo.website.Entity"/> 
        <knownType type="ledinghuo.website.Entity.ShelfLifeUnit, ledinghuo.website.Entity"/> 
        <knownType type="ledinghuo.website.Entity.DeliveryType, ledinghuo.website.Entity"/> 
        <knownType type="ledinghuo.website.Entity.QualityStyle, ledinghuo.website.Entity"/> 
 
      </declaredTypes>
    </dataContractSerializer>
  </system.runtime.serialization>

*/
    #region enums
 

    #region DeliveryStatus
    /// <summary>
    /// DeliveryStatus,
    /// </summary>
    public enum DeliveryStatus 
    {
           
    /// <summary>
    /// 未发货
    /// </summary> 
    [Description("未发货")]
    NonDelivery=1,
           
    /// <summary>
    /// 配送中
    /// </summary> 
    [Description("配送中")]
    Delivery=2,
           
    /// <summary>
    /// 配送完成
    /// </summary> 
    [Description("配送完成")]
    DeliveryComplete=3,
            }
    #endregion
 

    #region SettleStatus
    /// <summary>
    /// SettleStatus,
    /// </summary>
    public enum SettleStatus 
    {
           
    /// <summary>
    /// 未结算
    /// </summary> 
    [Description("未结算")]
    UnSettleed=1,
           
    /// <summary>
    /// 已部分结算
    /// </summary> 
    [Description("已部分结算")]
    SettleedPart=2,
           
    /// <summary>
    /// 结算完成 
    /// </summary> 
    [Description("结算完成 ")]
    SettleedComplete=3,
            }
    #endregion
 

    #region CompanyType
    /// <summary>
    /// CompanyType,
    /// </summary>
    public enum CompanyType 
    {
           
    /// <summary>
    /// 生产
    /// </summary> 
    [Description("生产")]
    Production=1,
           
    /// <summary>
    /// 批发
    /// </summary> 
    [Description("批发")]
    Retail=2,
           
    /// <summary>
    /// 零售
    /// </summary> 
    [Description("零售")]
    Wholesale=3,
            }
    #endregion
 

    #region ShelfLifeUnit
    /// <summary>
    /// ShelfLifeUnit,
    /// </summary>
    public enum ShelfLifeUnit 
    {
           
    /// <summary>
    /// 无
    /// </summary> 
    [Description("无")]
    None=0,
           
    /// <summary>
    /// 年
    /// </summary> 
    [Description("年")]
    Year=1,
           
    /// <summary>
    /// 月
    /// </summary> 
    [Description("月")]
    Month=2,
           
    /// <summary>
    /// 日
    /// </summary> 
    [Description("日")]
    Day=3,
            }
    #endregion
 

    #region DeliveryType
    /// <summary>
    /// DeliveryType,
    /// </summary>
    public enum DeliveryType 
    {
           
    /// <summary>
    /// 我方配送
    /// </summary> 
    [Description("我方配送")]
    Delivery=1,
           
    /// <summary>
    /// 客户自提
    /// </summary> 
    [Description("客户自提")]
    PickUp=2,
           
    /// <summary>
    /// 当场交货
    /// </summary> 
    [Description("当场交货")]
    RealTimeDelivery=3,
            }
    #endregion
 

    #region QualityStyle
    /// <summary>
    /// QualityStyle,质量状态
    /// </summary>
    public enum QualityStyle 
    {
           
    /// <summary>
    /// 合格
    /// </summary> 
    [Description("合格")]
    Qualified=1,
           
    /// <summary>
    /// 不合格
    /// </summary> 
    [Description("不合格")]
    NotQualified=2,
            }
    #endregion

    #endregion




    #region Company
    /// <summary>
    /// Company,标准的企业用户
    /// 
    /// IsAudit==true && IsRegister=true 有营业执照审核企业注册号且已经开通账号且 ，一般工商导入且开通使用账号属于这种情况
    /// IsAudit==true  && IsRegister=false 有营业执照审核企业注册号且但是没开通账号，一般工商导入但未开通账号属于这种情况
    /// IsAudit==false && IsRegister=true 不能出现这种情况，属于逻辑错误
    /// IsAudit==false && IsRegister=false 地图抓取的属于这种情况
    /// </summary>
    [Table]
    public partial class Company 
    {
        
        public Company()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// Id主键,
        /// </summary>
        [DisplayName("Id主键")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="Id主键不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 企业代码,
        /// </summary>
        [DisplayName("企业代码")]
        [Column(Size = 10)]
[Required(ErrorMessage="企业代码不允许空")]
[MaxLength(10,ErrorMessage="企业代码不能超过10个字")]
 
        public string CompanyCode {  get; set; }


        /// <summary>
        /// 企业名称,公司简称
        /// </summary>
        [DisplayName("企业名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="企业名称不允许空")]
[MaxLength(20,ErrorMessage="企业名称不能超过20个字")]
 
        public string CompanyName {  get; set; }


        /// <summary>
        /// 所在地区,地区
        /// </summary>
        [DisplayName("所在地区")]
        [Column()]
[Required(ErrorMessage="所在地区不允许空")]
 
        public long AreaId {  get; set; }


        /// <summary>
        /// 公司全称,
        /// </summary>
        [DisplayName("公司全称")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="公司全称不能超过50个字")]
 
        public string FullName {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="手机不能超过20个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 电子邮件,
        /// </summary>
        [DisplayName("电子邮件")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="电子邮件不能超过100个字")]
 
        public string Email {  get; set; }


        /// <summary>
        /// 电话,
        /// </summary>
        [DisplayName("电话")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="电话不能超过20个字")]
 
        public string Phone {  get; set; }


        /// <summary>
        /// 经营地址,
        /// </summary>
        [DisplayName("经营地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="经营地址不能超过200个字")]
 
        public string Address {  get; set; }


        /// <summary>
        /// 营业执照号码,
        /// </summary>
        [DisplayName("营业执照号码")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="营业执照号码不能超过50个字")]
 
        public string Certificate {  get; set; }


        /// <summary>
        /// 营业执照图片地址,
        /// </summary>
        [DisplayName("营业执照图片地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="营业执照图片地址不能超过200个字")]
 
        public string CertificateImage {  get; set; }


        /// <summary>
        /// 营业执照缩略图地址,
        /// </summary>
        [DisplayName("营业执照缩略图地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="营业执照缩略图地址不能超过200个字")]
 
        public string CertificateThumb {  get; set; }


        /// <summary>
        /// 记录创建时间，通常是注册时间,
        /// </summary>
        [DisplayName("记录创建时间，通常是注册时间")]
        [Column()]
[Required(ErrorMessage="记录创建时间，通常是注册时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 是否注册,
        /// </summary>
        [DisplayName("是否注册")]
        [Column()]
[Required(ErrorMessage="是否注册不允许空")]
 
        public bool IsRegister {  get; set; }


        /// <summary>
        /// 注册时间,
        /// </summary>
        [DisplayName("注册时间")]
        [Column()]
 
        public DateTime? RegisterTime {  get; set; }


        /// <summary>
        /// 启用禁用,
        /// </summary>
        [DisplayName("启用禁用")]
        [Column()]
[Required(ErrorMessage="启用禁用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 是否审核,
        /// </summary>
        [DisplayName("是否审核")]
        [Column()]
[Required(ErrorMessage="是否审核不允许空")]
 
        public bool IsAudit {  get; set; }


        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        [DisplayName("是否已标记地图")]
        [Column()]
[Required(ErrorMessage="是否已标记地图不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column()]
[Required(ErrorMessage="X不允许空")]
 
        public float X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column()]
[Required(ErrorMessage="Y不允许空")]
 
        public float Y {  get; set; }


        /// <summary>
        /// 数据来源,
        /// </summary>
        [DisplayName("数据来源")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="数据来源不能超过30个字")]
 
        public string Source {  get; set; }


        /// <summary>
        /// 企业类别,
        /// </summary>
        [DisplayName("企业类别")]
        [Column()]
[Required(ErrorMessage="企业类别不允许空")]
 
        public CompanyType CompanyTypeId {  get; set; }


        /// <summary>
        /// 是否已开通电商,
        /// </summary>
        [DisplayName("是否已开通电商")]
        [Column()]
[Required(ErrorMessage="是否已开通电商不允许空")]
 
        public bool IsOpenShop {  get; set; }


        /// <summary>
        /// 上级直属单位,必须是厂家直属的机构，
        /// </summary>
        [DisplayName("上级直属单位")]
        [Column()]
[Required(ErrorMessage="上级直属单位不允许空")]
 
        public long ParentCompanyId {  get; set; }


        /// <summary>
        /// 审核员,
        /// </summary>
        [DisplayName("审核员")]
        [Column()]
[Required(ErrorMessage="审核员不允许空")]
 
        public long ManagerId {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Company.Area,
        /// </summary>
        [Relation("this.AreaId=out.AreaId")]
        public Area Area { get;  set;  } 



        /// <summary>
        /// Company.Manager,
        /// </summary>
        [Relation("this.ManagerId=out.ManagerId")]
        public Manager Manager { get;  set;  } 



        #endregion
    }
    #endregion
    #region CompanyProperties
    public static partial class Company_
    {
    
        private static CompanyDescriptor instance = new CompanyDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// Id主键,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 企业代码,
        /// </summary>
        public static PropertyExpression CompanyCode { get{return instance.CompanyCode;}} 
        /// <summary>
        /// 企业名称,公司简称
        /// </summary>
        public static PropertyExpression CompanyName { get{return instance.CompanyName;}} 
        /// <summary>
        /// 所在地区,地区
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 公司全称,
        /// </summary>
        public static PropertyExpression FullName { get{return instance.FullName;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public static PropertyExpression Email { get{return instance.Email;}} 
        /// <summary>
        /// 电话,
        /// </summary>
        public static PropertyExpression Phone { get{return instance.Phone;}} 
        /// <summary>
        /// 经营地址,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}} 
        /// <summary>
        /// 营业执照号码,
        /// </summary>
        public static PropertyExpression Certificate { get{return instance.Certificate;}} 
        /// <summary>
        /// 营业执照图片地址,
        /// </summary>
        public static PropertyExpression CertificateImage { get{return instance.CertificateImage;}} 
        /// <summary>
        /// 营业执照缩略图地址,
        /// </summary>
        public static PropertyExpression CertificateThumb { get{return instance.CertificateThumb;}} 
        /// <summary>
        /// 记录创建时间，通常是注册时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 是否注册,
        /// </summary>
        public static PropertyExpression IsRegister { get{return instance.IsRegister;}} 
        /// <summary>
        /// 注册时间,
        /// </summary>
        public static PropertyExpression RegisterTime { get{return instance.RegisterTime;}} 
        /// <summary>
        /// 启用禁用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 是否审核,
        /// </summary>
        public static PropertyExpression IsAudit { get{return instance.IsAudit;}} 
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// 数据来源,
        /// </summary>
        public static PropertyExpression Source { get{return instance.Source;}} 
        /// <summary>
        /// 企业类别,
        /// </summary>
        public static PropertyExpression CompanyTypeId { get{return instance.CompanyTypeId;}} 
        /// <summary>
        /// 是否已开通电商,
        /// </summary>
        public static PropertyExpression IsOpenShop { get{return instance.IsOpenShop;}} 
        /// <summary>
        /// 上级直属单位,必须是厂家直属的机构，
        /// </summary>
        public static PropertyExpression ParentCompanyId { get{return instance.ParentCompanyId;}} 
        /// <summary>
        /// 审核员,
        /// </summary>
        public static PropertyExpression ManagerId { get{return instance.ManagerId;}}


 
        /// <summary>
        /// Company.Area,
        /// </summary>
        public static AreaDescriptor Area { get{return instance.Area;}} 
        /// <summary>
        /// Company.Manager,
        /// </summary>
        public static ManagerDescriptor Manager { get{return instance.Manager;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CompanyDescriptor
    public partial class CompanyDescriptor:ObjectDescriptorBase
    {
     
        public CompanyDescriptor(string prefix):base(prefix)
        {  
    
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._CompanyCode = new PropertyExpression(prefix + "CompanyCode");
            this._CompanyName = new PropertyExpression(prefix + "CompanyName");
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._FullName = new PropertyExpression(prefix + "FullName");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._Email = new PropertyExpression(prefix + "Email");
            this._Phone = new PropertyExpression(prefix + "Phone");
            this._Address = new PropertyExpression(prefix + "Address");
            this._Certificate = new PropertyExpression(prefix + "Certificate");
            this._CertificateImage = new PropertyExpression(prefix + "CertificateImage");
            this._CertificateThumb = new PropertyExpression(prefix + "CertificateThumb");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._IsRegister = new PropertyExpression(prefix + "IsRegister");
            this._RegisterTime = new PropertyExpression(prefix + "RegisterTime");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._IsAudit = new PropertyExpression(prefix + "IsAudit");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._Source = new PropertyExpression(prefix + "Source");
            this._CompanyTypeId = new PropertyExpression(prefix + "CompanyTypeId");
            this._IsOpenShop = new PropertyExpression(prefix + "IsOpenShop");
            this._ParentCompanyId = new PropertyExpression(prefix + "ParentCompanyId");
            this._ManagerId = new PropertyExpression(prefix + "ManagerId");
            ALL = new PropertyExpression[] {this._CompanyId,this._CompanyCode,this._CompanyName,this._AreaId,this._FullName,this._ContactName,this._Mb,this._Email,this._Phone,this._Address,this._Certificate,this._CertificateImage,this._CertificateThumb,this._CreateTime,this._IsRegister,this._RegisterTime,this._IsActive,this._IsAudit,this._IsMapped,this._X,this._Y,this._Source,this._CompanyTypeId,this._IsOpenShop,this._ParentCompanyId,this._ManagerId};
        }
         

        private PropertyExpression _CompanyId;
        /// <summary>
        /// Id主键,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _CompanyCode;
        /// <summary>
        /// 企业代码,
        /// </summary>
        public PropertyExpression CompanyCode { get{return _CompanyCode;}}
        private PropertyExpression _CompanyName;
        /// <summary>
        /// 企业名称,公司简称
        /// </summary>
        public PropertyExpression CompanyName { get{return _CompanyName;}}
        private PropertyExpression _AreaId;
        /// <summary>
        /// 所在地区,地区
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _FullName;
        /// <summary>
        /// 公司全称,
        /// </summary>
        public PropertyExpression FullName { get{return _FullName;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _Email;
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public PropertyExpression Email { get{return _Email;}}
        private PropertyExpression _Phone;
        /// <summary>
        /// 电话,
        /// </summary>
        public PropertyExpression Phone { get{return _Phone;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 经营地址,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}
        private PropertyExpression _Certificate;
        /// <summary>
        /// 营业执照号码,
        /// </summary>
        public PropertyExpression Certificate { get{return _Certificate;}}
        private PropertyExpression _CertificateImage;
        /// <summary>
        /// 营业执照图片地址,
        /// </summary>
        public PropertyExpression CertificateImage { get{return _CertificateImage;}}
        private PropertyExpression _CertificateThumb;
        /// <summary>
        /// 营业执照缩略图地址,
        /// </summary>
        public PropertyExpression CertificateThumb { get{return _CertificateThumb;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 记录创建时间，通常是注册时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _IsRegister;
        /// <summary>
        /// 是否注册,
        /// </summary>
        public PropertyExpression IsRegister { get{return _IsRegister;}}
        private PropertyExpression _RegisterTime;
        /// <summary>
        /// 注册时间,
        /// </summary>
        public PropertyExpression RegisterTime { get{return _RegisterTime;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 启用禁用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _IsAudit;
        /// <summary>
        /// 是否审核,
        /// </summary>
        public PropertyExpression IsAudit { get{return _IsAudit;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _Source;
        /// <summary>
        /// 数据来源,
        /// </summary>
        public PropertyExpression Source { get{return _Source;}}
        private PropertyExpression _CompanyTypeId;
        /// <summary>
        /// 企业类别,
        /// </summary>
        public PropertyExpression CompanyTypeId { get{return _CompanyTypeId;}}
        private PropertyExpression _IsOpenShop;
        /// <summary>
        /// 是否已开通电商,
        /// </summary>
        public PropertyExpression IsOpenShop { get{return _IsOpenShop;}}
        private PropertyExpression _ParentCompanyId;
        /// <summary>
        /// 上级直属单位,必须是厂家直属的机构，
        /// </summary>
        public PropertyExpression ParentCompanyId { get{return _ParentCompanyId;}}
        private PropertyExpression _ManagerId;
        /// <summary>
        /// 审核员,
        /// </summary>
        public PropertyExpression ManagerId { get{return _ManagerId;}}



        private AreaDescriptor _Area;
        public AreaDescriptor Area 
        { 
            get
            {
                if(_Area==null) _Area=new AreaDescriptor(base.Prefix+"Area.");
                return _Area;
            }
        }
        private ManagerDescriptor _Manager;
        public ManagerDescriptor Manager 
        { 
            get
            {
                if(_Manager==null) _Manager=new ManagerDescriptor(base.Prefix+"Manager.");
                return _Manager;
            }
        }
    }
     #endregion


    #region Companys
    /// <summary>
    /// Company,标准的企业用户
    /// 
    /// IsAudit==true && IsRegister=true 有营业执照审核企业注册号且已经开通账号且 ，一般工商导入且开通使用账号属于这种情况
    /// IsAudit==true  && IsRegister=false 有营业执照审核企业注册号且但是没开通账号，一般工商导入但未开通账号属于这种情况
    /// IsAudit==false && IsRegister=true 不能出现这种情况，属于逻辑错误
    /// IsAudit==false && IsRegister=false 地图抓取的属于这种情况
    /// </summary>
    [Table]
    public partial class Companys:EntityList<Company> 
    {
        
    }
    #endregion


    #region Area
    /// <summary>
    /// Area,地区
    /// </summary>
    [Table]
    public partial class Area 
    {
        
        public Area()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 主键,
        /// </summary>
        [DisplayName("主键")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="主键不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long AreaId {  get; set; }


        /// <summary>
        /// 地区名称,
        /// </summary>
        [DisplayName("地区名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="地区名称不允许空")]
[MaxLength(20,ErrorMessage="地区名称不能超过20个字")]
 
        public string AreaName {  get; set; }


        /// <summary>
        /// 上级地区,0表示顶级,
        /// </summary>
        [DisplayName("上级地区,0表示顶级")]
        [Column()]
[Required(ErrorMessage="上级地区,0表示顶级不允许空")]
 
        public long ParentAreaId {  get; set; }


        /// <summary>
        /// LeftSeed,
        /// </summary>
        [DisplayName("LeftSeed")]
        [Column()]
[Required(ErrorMessage="LeftSeed不允许空")]
 
        public int LeftSeed {  get; set; }


        /// <summary>
        /// RightSeed,
        /// </summary>
        [DisplayName("RightSeed")]
        [Column()]
[Required(ErrorMessage="RightSeed不允许空")]
 
        public int RightSeed {  get; set; }


        /// <summary>
        /// 子节点数量,
        /// </summary>
        [DisplayName("子节点数量")]
        [Column()]
[Required(ErrorMessage="子节点数量不允许空")]
 
        public int ChildCount {  get; set; }


        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        [DisplayName("子孙节点数量")]
        [Column()]
[Required(ErrorMessage="子孙节点数量不允许空")]
 
        public int ChildCountAll {  get; set; }


        #endregion

    }
    #endregion
    #region AreaProperties
    public static partial class Area_
    {
    
        private static AreaDescriptor instance = new AreaDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 主键,
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 地区名称,
        /// </summary>
        public static PropertyExpression AreaName { get{return instance.AreaName;}} 
        /// <summary>
        /// 上级地区,0表示顶级,
        /// </summary>
        public static PropertyExpression ParentAreaId { get{return instance.ParentAreaId;}} 
        /// <summary>
        /// LeftSeed,
        /// </summary>
        public static PropertyExpression LeftSeed { get{return instance.LeftSeed;}} 
        /// <summary>
        /// RightSeed,
        /// </summary>
        public static PropertyExpression RightSeed { get{return instance.RightSeed;}} 
        /// <summary>
        /// 子节点数量,
        /// </summary>
        public static PropertyExpression ChildCount { get{return instance.ChildCount;}} 
        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        public static PropertyExpression ChildCountAll { get{return instance.ChildCountAll;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region AreaDescriptor
    public partial class AreaDescriptor:ObjectDescriptorBase
    {
     
        public AreaDescriptor(string prefix):base(prefix)
        {  
    
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._AreaName = new PropertyExpression(prefix + "AreaName");
            this._ParentAreaId = new PropertyExpression(prefix + "ParentAreaId");
            this._LeftSeed = new PropertyExpression(prefix + "LeftSeed");
            this._RightSeed = new PropertyExpression(prefix + "RightSeed");
            this._ChildCount = new PropertyExpression(prefix + "ChildCount");
            this._ChildCountAll = new PropertyExpression(prefix + "ChildCountAll");
            ALL = new PropertyExpression[] {this._AreaId,this._AreaName,this._ParentAreaId,this._LeftSeed,this._RightSeed,this._ChildCount,this._ChildCountAll};
        }
         

        private PropertyExpression _AreaId;
        /// <summary>
        /// 主键,
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _AreaName;
        /// <summary>
        /// 地区名称,
        /// </summary>
        public PropertyExpression AreaName { get{return _AreaName;}}
        private PropertyExpression _ParentAreaId;
        /// <summary>
        /// 上级地区,0表示顶级,
        /// </summary>
        public PropertyExpression ParentAreaId { get{return _ParentAreaId;}}
        private PropertyExpression _LeftSeed;
        /// <summary>
        /// LeftSeed,
        /// </summary>
        public PropertyExpression LeftSeed { get{return _LeftSeed;}}
        private PropertyExpression _RightSeed;
        /// <summary>
        /// RightSeed,
        /// </summary>
        public PropertyExpression RightSeed { get{return _RightSeed;}}
        private PropertyExpression _ChildCount;
        /// <summary>
        /// 子节点数量,
        /// </summary>
        public PropertyExpression ChildCount { get{return _ChildCount;}}
        private PropertyExpression _ChildCountAll;
        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        public PropertyExpression ChildCountAll { get{return _ChildCountAll;}}



    }
     #endregion


    #region Areas
    /// <summary>
    /// Area,地区
    /// </summary>
    [Table]
    public partial class Areas:EntityList<Area> 
    {
        
    }
    #endregion


    #region Employee
    /// <summary>
    /// Employee,员工
    /// </summary>
    [Table]
    public partial class Employee 
    {
        
        public Employee()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// EmployeeId,
        /// </summary>
        [DisplayName("EmployeeId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="EmployeeId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 员工姓名,
        /// </summary>
        [DisplayName("员工姓名")]
        [Column(Size = 20)]
[Required(ErrorMessage="员工姓名不允许空")]
[MaxLength(20,ErrorMessage="员工姓名不能超过20个字")]
 
        public string EmployeeName {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        [DisplayName("登录号")]
        [Column(Size = 30)]
[Required(ErrorMessage="登录号不允许空")]
[MaxLength(30,ErrorMessage="登录号不能超过30个字")]
 
        public string LoginNo {  get; set; }


        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        [DisplayName("登陆密码")]
        [Column(Size = 40)]
[Required(ErrorMessage="登陆密码不允许空")]
[MaxLength(40,ErrorMessage="登陆密码不能超过40个字")]
 
        public string Password {  get; set; }


        /// <summary>
        /// 是否启用,,false表示删除或离职
        /// </summary>
        [DisplayName("是否启用")]
        [Column()]
[Required(ErrorMessage="是否启用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="手机不能超过100个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 邮箱,
        /// </summary>
        [DisplayName("邮箱")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="邮箱不能超过100个字")]
 
        public string Email {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Employee.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        #endregion
    }
    #endregion
    #region EmployeeProperties
    public static partial class Employee_
    {
    
        private static EmployeeDescriptor instance = new EmployeeDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 员工姓名,
        /// </summary>
        public static PropertyExpression EmployeeName { get{return instance.EmployeeName;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        public static PropertyExpression LoginNo { get{return instance.LoginNo;}} 
        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        public static PropertyExpression Password { get{return instance.Password;}} 
        /// <summary>
        /// 是否启用,,false表示删除或离职
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 邮箱,
        /// </summary>
        public static PropertyExpression Email { get{return instance.Email;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}}


 
        /// <summary>
        /// Employee.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region EmployeeDescriptor
    public partial class EmployeeDescriptor:ObjectDescriptorBase
    {
     
        public EmployeeDescriptor(string prefix):base(prefix)
        {  
    
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._EmployeeName = new PropertyExpression(prefix + "EmployeeName");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._LoginNo = new PropertyExpression(prefix + "LoginNo");
            this._Password = new PropertyExpression(prefix + "Password");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._Email = new PropertyExpression(prefix + "Email");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            ALL = new PropertyExpression[] {this._EmployeeId,this._EmployeeName,this._CompanyId,this._LoginNo,this._Password,this._IsActive,this._Mb,this._Email,this._Remark,this._CreateTime};
        }
         

        private PropertyExpression _EmployeeId;
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _EmployeeName;
        /// <summary>
        /// 员工姓名,
        /// </summary>
        public PropertyExpression EmployeeName { get{return _EmployeeName;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _LoginNo;
        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        public PropertyExpression LoginNo { get{return _LoginNo;}}
        private PropertyExpression _Password;
        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        public PropertyExpression Password { get{return _Password;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否启用,,false表示删除或离职
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _Email;
        /// <summary>
        /// 邮箱,
        /// </summary>
        public PropertyExpression Email { get{return _Email;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
    }
     #endregion


    #region Employees
    /// <summary>
    /// Employee,员工
    /// </summary>
    [Table]
    public partial class Employees:EntityList<Employee> 
    {
        
    }
    #endregion


    #region EmployeeConfig
    /// <summary>
    /// EmployeeConfig,保存用户配置
    /// </summary>
    [Table]
    public partial class EmployeeConfig 
    {
        
        public EmployeeConfig()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// EmployeeId,
        /// </summary>
        [DisplayName("EmployeeId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="EmployeeId不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// VarName,
        /// </summary>
        [DisplayName("VarName")]
        [Column(IsPrimaryKey = true,Size = 100)]
[Required(ErrorMessage="VarName不允许空")]
[MaxLength(100,ErrorMessage="VarName不能超过100个字")]
 
        public string VarName {  get; set; }


        /// <summary>
        /// VarValue,
        /// </summary>
        [DisplayName("VarValue")]
        [Column()]
 
        public string VarValue {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// EmployeeConfig.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region EmployeeConfigProperties
    public static partial class EmployeeConfig_
    {
    
        private static EmployeeConfigDescriptor instance = new EmployeeConfigDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// VarName,
        /// </summary>
        public static PropertyExpression VarName { get{return instance.VarName;}} 
        /// <summary>
        /// VarValue,
        /// </summary>
        public static PropertyExpression VarValue { get{return instance.VarValue;}}


 
        /// <summary>
        /// EmployeeConfig.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region EmployeeConfigDescriptor
    public partial class EmployeeConfigDescriptor:ObjectDescriptorBase
    {
     
        public EmployeeConfigDescriptor(string prefix):base(prefix)
        {  
    
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._VarName = new PropertyExpression(prefix + "VarName");
            this._VarValue = new PropertyExpression(prefix + "VarValue");
            ALL = new PropertyExpression[] {this._EmployeeId,this._VarName,this._VarValue};
        }
         

        private PropertyExpression _EmployeeId;
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _VarName;
        /// <summary>
        /// VarName,
        /// </summary>
        public PropertyExpression VarName { get{return _VarName;}}
        private PropertyExpression _VarValue;
        /// <summary>
        /// VarValue,
        /// </summary>
        public PropertyExpression VarValue { get{return _VarValue;}}



        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region EmployeeConfigs
    /// <summary>
    /// EmployeeConfig,保存用户配置
    /// </summary>
    [Table]
    public partial class EmployeeConfigs:EntityList<EmployeeConfig> 
    {
        
    }
    #endregion


    #region SystemConfig
    /// <summary>
    /// SystemConfig, 保存系统配置
    /// </summary>
    [Table]
    public partial class SystemConfig 
    {
        
        public SystemConfig()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 变量名称,
        /// </summary>
        [DisplayName("变量名称")]
        [Column(IsPrimaryKey = true,Size = 100)]
[Required(ErrorMessage="变量名称不允许空")]
[MaxLength(100,ErrorMessage="变量名称不能超过100个字")]
 
        public string VarName {  get; set; }


        /// <summary>
        /// 变量值,
        /// </summary>
        [DisplayName("变量值")]
        [Column()]
 
        public string VarValue {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// SystemConfig.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        #endregion
    }
    #endregion
    #region SystemConfigProperties
    public static partial class SystemConfig_
    {
    
        private static SystemConfigDescriptor instance = new SystemConfigDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 变量名称,
        /// </summary>
        public static PropertyExpression VarName { get{return instance.VarName;}} 
        /// <summary>
        /// 变量值,
        /// </summary>
        public static PropertyExpression VarValue { get{return instance.VarValue;}}


 
        /// <summary>
        /// SystemConfig.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region SystemConfigDescriptor
    public partial class SystemConfigDescriptor:ObjectDescriptorBase
    {
     
        public SystemConfigDescriptor(string prefix):base(prefix)
        {  
    
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._VarName = new PropertyExpression(prefix + "VarName");
            this._VarValue = new PropertyExpression(prefix + "VarValue");
            ALL = new PropertyExpression[] {this._CompanyId,this._VarName,this._VarValue};
        }
         

        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _VarName;
        /// <summary>
        /// 变量名称,
        /// </summary>
        public PropertyExpression VarName { get{return _VarName;}}
        private PropertyExpression _VarValue;
        /// <summary>
        /// 变量值,
        /// </summary>
        public PropertyExpression VarValue { get{return _VarValue;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
    }
     #endregion


    #region SystemConfigs
    /// <summary>
    /// SystemConfig, 保存系统配置
    /// </summary>
    [Table]
    public partial class SystemConfigs:EntityList<SystemConfig> 
    {
        
    }
    #endregion


    #region Category
    /// <summary>
    /// Category,商品类别
    /// </summary>
    [Table]
    public partial class Category 
    {
        
        public Category()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 主键,
        /// </summary>
        [DisplayName("主键")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="主键不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CategoryId {  get; set; }


        /// <summary>
        /// 类别名称,
        /// </summary>
        [DisplayName("类别名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="类别名称不允许空")]
[MaxLength(20,ErrorMessage="类别名称不能超过20个字")]
 
        public string CategoryName {  get; set; }


        /// <summary>
        /// 上级类别,上级地区,0表示顶级
        /// </summary>
        [DisplayName("上级类别")]
        [Column()]
[Required(ErrorMessage="上级类别不允许空")]
 
        public long ParentCategoryId {  get; set; }


        /// <summary>
        /// LeftSeed,
        /// </summary>
        [DisplayName("LeftSeed")]
        [Column()]
[Required(ErrorMessage="LeftSeed不允许空")]
 
        public int LeftSeed {  get; set; }


        /// <summary>
        /// RightSeed,
        /// </summary>
        [DisplayName("RightSeed")]
        [Column()]
[Required(ErrorMessage="RightSeed不允许空")]
 
        public int RightSeed {  get; set; }


        /// <summary>
        /// 子节点数量,
        /// </summary>
        [DisplayName("子节点数量")]
        [Column()]
[Required(ErrorMessage="子节点数量不允许空")]
 
        public int ChildCount {  get; set; }


        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        [DisplayName("子孙节点数量")]
        [Column()]
[Required(ErrorMessage="子孙节点数量不允许空")]
 
        public int ChildCountAll {  get; set; }


        #endregion

    }
    #endregion
    #region CategoryProperties
    public static partial class Category_
    {
    
        private static CategoryDescriptor instance = new CategoryDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 主键,
        /// </summary>
        public static PropertyExpression CategoryId { get{return instance.CategoryId;}} 
        /// <summary>
        /// 类别名称,
        /// </summary>
        public static PropertyExpression CategoryName { get{return instance.CategoryName;}} 
        /// <summary>
        /// 上级类别,上级地区,0表示顶级
        /// </summary>
        public static PropertyExpression ParentCategoryId { get{return instance.ParentCategoryId;}} 
        /// <summary>
        /// LeftSeed,
        /// </summary>
        public static PropertyExpression LeftSeed { get{return instance.LeftSeed;}} 
        /// <summary>
        /// RightSeed,
        /// </summary>
        public static PropertyExpression RightSeed { get{return instance.RightSeed;}} 
        /// <summary>
        /// 子节点数量,
        /// </summary>
        public static PropertyExpression ChildCount { get{return instance.ChildCount;}} 
        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        public static PropertyExpression ChildCountAll { get{return instance.ChildCountAll;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CategoryDescriptor
    public partial class CategoryDescriptor:ObjectDescriptorBase
    {
     
        public CategoryDescriptor(string prefix):base(prefix)
        {  
    
            this._CategoryId = new PropertyExpression(prefix + "CategoryId");
            this._CategoryName = new PropertyExpression(prefix + "CategoryName");
            this._ParentCategoryId = new PropertyExpression(prefix + "ParentCategoryId");
            this._LeftSeed = new PropertyExpression(prefix + "LeftSeed");
            this._RightSeed = new PropertyExpression(prefix + "RightSeed");
            this._ChildCount = new PropertyExpression(prefix + "ChildCount");
            this._ChildCountAll = new PropertyExpression(prefix + "ChildCountAll");
            ALL = new PropertyExpression[] {this._CategoryId,this._CategoryName,this._ParentCategoryId,this._LeftSeed,this._RightSeed,this._ChildCount,this._ChildCountAll};
        }
         

        private PropertyExpression _CategoryId;
        /// <summary>
        /// 主键,
        /// </summary>
        public PropertyExpression CategoryId { get{return _CategoryId;}}
        private PropertyExpression _CategoryName;
        /// <summary>
        /// 类别名称,
        /// </summary>
        public PropertyExpression CategoryName { get{return _CategoryName;}}
        private PropertyExpression _ParentCategoryId;
        /// <summary>
        /// 上级类别,上级地区,0表示顶级
        /// </summary>
        public PropertyExpression ParentCategoryId { get{return _ParentCategoryId;}}
        private PropertyExpression _LeftSeed;
        /// <summary>
        /// LeftSeed,
        /// </summary>
        public PropertyExpression LeftSeed { get{return _LeftSeed;}}
        private PropertyExpression _RightSeed;
        /// <summary>
        /// RightSeed,
        /// </summary>
        public PropertyExpression RightSeed { get{return _RightSeed;}}
        private PropertyExpression _ChildCount;
        /// <summary>
        /// 子节点数量,
        /// </summary>
        public PropertyExpression ChildCount { get{return _ChildCount;}}
        private PropertyExpression _ChildCountAll;
        /// <summary>
        /// 子孙节点数量,
        /// </summary>
        public PropertyExpression ChildCountAll { get{return _ChildCountAll;}}



    }
     #endregion


    #region Categorys
    /// <summary>
    /// Category,商品类别
    /// </summary>
    [Table]
    public partial class Categorys:EntityList<Category> 
    {
        
    }
    #endregion


    #region Customer
    /// <summary>
    /// Customer,
    /// </summary>
    [Table]
    public partial class Customer 
    {
        
        public Customer()
        {

            CreateTime=DateTime.Now;
            UpdateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// CustomerId,
        /// </summary>
        [DisplayName("CustomerId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="CustomerId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CustomerId {  get; set; }


        /// <summary>
        /// CompanyId,
        /// </summary>
        [DisplayName("CompanyId")]
        [Column()]
[Required(ErrorMessage="CompanyId不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 所在地区,
        /// </summary>
        [DisplayName("所在地区")]
        [Column()]
[Required(ErrorMessage="所在地区不允许空")]
 
        public long AreaId {  get; set; }


        /// <summary>
        /// 客户编号,
        /// </summary>
        [DisplayName("客户编号")]
        [Column(Size = 20)]
[Required(ErrorMessage="客户编号不允许空")]
[MaxLength(20,ErrorMessage="客户编号不能超过20个字")]
 
        public string CustomerNo {  get; set; }


        /// <summary>
        /// 客户名称,
        /// </summary>
        [DisplayName("客户名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="客户名称不允许空")]
[MaxLength(20,ErrorMessage="客户名称不能超过20个字")]
 
        public string CustomerName {  get; set; }


        /// <summary>
        /// 客户全称,
        /// </summary>
        [DisplayName("客户全称")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="客户全称不能超过50个字")]
 
        public string FullName {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="手机不能超过20个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 电子邮件,
        /// </summary>
        [DisplayName("电子邮件")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="电子邮件不能超过100个字")]
[RegularExpression(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$|\s", ErrorMessage = "电子邮件格式错误")] 
        public string Email {  get; set; }


        /// <summary>
        /// 电话,
        /// </summary>
        [DisplayName("电话")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="电话不能超过20个字")]
 
        public string Phone {  get; set; }


        /// <summary>
        /// 地址,
        /// </summary>
        [DisplayName("地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="地址不能超过200个字")]
 
        public string Address {  get; set; }


        /// <summary>
        /// GlobalCompanyId,
        /// </summary>
        [DisplayName("GlobalCompanyId")]
        [Column()]
[Required(ErrorMessage="GlobalCompanyId不允许空")]
 
        public long GlobalCompanyId {  get; set; }


        /// <summary>
        /// 负责人,
        /// </summary>
        [DisplayName("负责人")]
        [Column()]
[Required(ErrorMessage="负责人不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 是否启用,
        /// </summary>
        [DisplayName("是否启用")]
        [Column()]
[Required(ErrorMessage="是否启用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 1000)]
[MaxLength(1000,ErrorMessage="备注不能超过1000个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 以标记,
        /// </summary>
        [DisplayName("以标记")]
        [Column()]
[Required(ErrorMessage="以标记不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column(Size = 20)]
[Required(ErrorMessage="X不允许空")]
 
        public decimal X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column(Size = 20)]
[Required(ErrorMessage="Y不允许空")]
 
        public decimal Y {  get; set; }


        /// <summary>
        /// 应收款,
        /// </summary>
        [DisplayName("应收款")]
        [Column(Size = 20)]
 
        public decimal? ReceivableCapital {  get; set; }


        /// <summary>
        /// 客户等级,
        /// </summary>
        [DisplayName("客户等级")]
        [Column()]
[Required(ErrorMessage="客户等级不允许空")]
 
        public long CustomerLevelId {  get; set; }


        /// <summary>
        /// 企业类别,
        /// </summary>
        [DisplayName("企业类别")]
        [Column()]
[Required(ErrorMessage="企业类别不允许空")]
 
        public CompanyType CompanyTypeId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 是否链接,
        /// </summary>
        [DisplayName("是否链接")]
        [Column()]
[Required(ErrorMessage="是否链接不允许空")]
 
        public bool IsLink {  get; set; }


        /// <summary>
        /// 企业代码,
        /// </summary>
        [DisplayName("企业代码")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="企业代码不能超过10个字")]
 
        public string CompanyCode {  get; set; }


        /// <summary>
        /// 最近订货时间,
        /// </summary>
        [DisplayName("最近订货时间")]
        [Column()]
 
        public DateTime? LatestOrderTime {  get; set; }


        /// <summary>
        /// 未完成订单数,
        /// </summary>
        [DisplayName("未完成订单数")]
        [Column()]
[Required(ErrorMessage="未完成订单数不允许空")]
 
        public long NotCompletedOrderCount {  get; set; }


        /// <summary>
        /// 修改时间,
        /// </summary>
        [DisplayName("修改时间")]
        [Column()]
[Required(ErrorMessage="修改时间不允许空")]
 
        public DateTime UpdateTime {  get; set; }


        /// <summary>
        /// 财务备注,
        /// </summary>
        [DisplayName("财务备注")]
        [Column(Size = 1000)]
[MaxLength(1000,ErrorMessage="财务备注不能超过1000个字")]
 
        public string FinanceRemark {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Customer.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// Customer.GlobalCompany,
        /// </summary>
        [Relation("this.GlobalCompanyId=out.CompanyId")]
        public Company GlobalCompany { get;  set;  } 



        /// <summary>
        /// Customer.Area,
        /// </summary>
        [Relation("this.AreaId=out.AreaId")]
        public Area Area { get;  set;  } 



        /// <summary>
        /// Customer.CustomerLevel,
        /// </summary>
        [Relation("this.CustomerLevelId=out.CustomerLevelId")]
        public CustomerLevel CustomerLevel { get;  set;  } 



        /// <summary>
        /// Customer.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region CustomerProperties
    public static partial class Customer_
    {
    
        private static CustomerDescriptor instance = new CustomerDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// CustomerId,
        /// </summary>
        public static PropertyExpression CustomerId { get{return instance.CustomerId;}} 
        /// <summary>
        /// CompanyId,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 所在地区,
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 客户编号,
        /// </summary>
        public static PropertyExpression CustomerNo { get{return instance.CustomerNo;}} 
        /// <summary>
        /// 客户名称,
        /// </summary>
        public static PropertyExpression CustomerName { get{return instance.CustomerName;}} 
        /// <summary>
        /// 客户全称,
        /// </summary>
        public static PropertyExpression FullName { get{return instance.FullName;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public static PropertyExpression Email { get{return instance.Email;}} 
        /// <summary>
        /// 电话,
        /// </summary>
        public static PropertyExpression Phone { get{return instance.Phone;}} 
        /// <summary>
        /// 地址,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}} 
        /// <summary>
        /// GlobalCompanyId,
        /// </summary>
        public static PropertyExpression GlobalCompanyId { get{return instance.GlobalCompanyId;}} 
        /// <summary>
        /// 负责人,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 是否启用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 以标记,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// 应收款,
        /// </summary>
        public static PropertyExpression ReceivableCapital { get{return instance.ReceivableCapital;}} 
        /// <summary>
        /// 客户等级,
        /// </summary>
        public static PropertyExpression CustomerLevelId { get{return instance.CustomerLevelId;}} 
        /// <summary>
        /// 企业类别,
        /// </summary>
        public static PropertyExpression CompanyTypeId { get{return instance.CompanyTypeId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 是否链接,
        /// </summary>
        public static PropertyExpression IsLink { get{return instance.IsLink;}} 
        /// <summary>
        /// 企业代码,
        /// </summary>
        public static PropertyExpression CompanyCode { get{return instance.CompanyCode;}} 
        /// <summary>
        /// 最近订货时间,
        /// </summary>
        public static PropertyExpression LatestOrderTime { get{return instance.LatestOrderTime;}} 
        /// <summary>
        /// 未完成订单数,
        /// </summary>
        public static PropertyExpression NotCompletedOrderCount { get{return instance.NotCompletedOrderCount;}} 
        /// <summary>
        /// 修改时间,
        /// </summary>
        public static PropertyExpression UpdateTime { get{return instance.UpdateTime;}} 
        /// <summary>
        /// 财务备注,
        /// </summary>
        public static PropertyExpression FinanceRemark { get{return instance.FinanceRemark;}}


 
        /// <summary>
        /// Customer.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// Customer.GlobalCompany,
        /// </summary>
        public static CompanyDescriptor GlobalCompany { get{return instance.GlobalCompany;}} 
        /// <summary>
        /// Customer.Area,
        /// </summary>
        public static AreaDescriptor Area { get{return instance.Area;}} 
        /// <summary>
        /// Customer.CustomerLevel,
        /// </summary>
        public static CustomerLevelDescriptor CustomerLevel { get{return instance.CustomerLevel;}} 
        /// <summary>
        /// Customer.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CustomerDescriptor
    public partial class CustomerDescriptor:ObjectDescriptorBase
    {
     
        public CustomerDescriptor(string prefix):base(prefix)
        {  
    
            this._CustomerId = new PropertyExpression(prefix + "CustomerId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._CustomerNo = new PropertyExpression(prefix + "CustomerNo");
            this._CustomerName = new PropertyExpression(prefix + "CustomerName");
            this._FullName = new PropertyExpression(prefix + "FullName");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._Email = new PropertyExpression(prefix + "Email");
            this._Phone = new PropertyExpression(prefix + "Phone");
            this._Address = new PropertyExpression(prefix + "Address");
            this._GlobalCompanyId = new PropertyExpression(prefix + "GlobalCompanyId");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._ReceivableCapital = new PropertyExpression(prefix + "ReceivableCapital");
            this._CustomerLevelId = new PropertyExpression(prefix + "CustomerLevelId");
            this._CompanyTypeId = new PropertyExpression(prefix + "CompanyTypeId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._IsLink = new PropertyExpression(prefix + "IsLink");
            this._CompanyCode = new PropertyExpression(prefix + "CompanyCode");
            this._LatestOrderTime = new PropertyExpression(prefix + "LatestOrderTime");
            this._NotCompletedOrderCount = new PropertyExpression(prefix + "NotCompletedOrderCount");
            this._UpdateTime = new PropertyExpression(prefix + "UpdateTime");
            this._FinanceRemark = new PropertyExpression(prefix + "FinanceRemark");
            ALL = new PropertyExpression[] {this._CustomerId,this._CompanyId,this._AreaId,this._CustomerNo,this._CustomerName,this._FullName,this._ContactName,this._Mb,this._Email,this._Phone,this._Address,this._GlobalCompanyId,this._EmployeeId,this._IsActive,this._Remark,this._IsMapped,this._X,this._Y,this._ReceivableCapital,this._CustomerLevelId,this._CompanyTypeId,this._CreateTime,this._IsLink,this._CompanyCode,this._LatestOrderTime,this._NotCompletedOrderCount,this._UpdateTime,this._FinanceRemark};
        }
         

        private PropertyExpression _CustomerId;
        /// <summary>
        /// CustomerId,
        /// </summary>
        public PropertyExpression CustomerId { get{return _CustomerId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// CompanyId,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _AreaId;
        /// <summary>
        /// 所在地区,
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _CustomerNo;
        /// <summary>
        /// 客户编号,
        /// </summary>
        public PropertyExpression CustomerNo { get{return _CustomerNo;}}
        private PropertyExpression _CustomerName;
        /// <summary>
        /// 客户名称,
        /// </summary>
        public PropertyExpression CustomerName { get{return _CustomerName;}}
        private PropertyExpression _FullName;
        /// <summary>
        /// 客户全称,
        /// </summary>
        public PropertyExpression FullName { get{return _FullName;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _Email;
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public PropertyExpression Email { get{return _Email;}}
        private PropertyExpression _Phone;
        /// <summary>
        /// 电话,
        /// </summary>
        public PropertyExpression Phone { get{return _Phone;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 地址,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}
        private PropertyExpression _GlobalCompanyId;
        /// <summary>
        /// GlobalCompanyId,
        /// </summary>
        public PropertyExpression GlobalCompanyId { get{return _GlobalCompanyId;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 负责人,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否启用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 以标记,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _ReceivableCapital;
        /// <summary>
        /// 应收款,
        /// </summary>
        public PropertyExpression ReceivableCapital { get{return _ReceivableCapital;}}
        private PropertyExpression _CustomerLevelId;
        /// <summary>
        /// 客户等级,
        /// </summary>
        public PropertyExpression CustomerLevelId { get{return _CustomerLevelId;}}
        private PropertyExpression _CompanyTypeId;
        /// <summary>
        /// 企业类别,
        /// </summary>
        public PropertyExpression CompanyTypeId { get{return _CompanyTypeId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _IsLink;
        /// <summary>
        /// 是否链接,
        /// </summary>
        public PropertyExpression IsLink { get{return _IsLink;}}
        private PropertyExpression _CompanyCode;
        /// <summary>
        /// 企业代码,
        /// </summary>
        public PropertyExpression CompanyCode { get{return _CompanyCode;}}
        private PropertyExpression _LatestOrderTime;
        /// <summary>
        /// 最近订货时间,
        /// </summary>
        public PropertyExpression LatestOrderTime { get{return _LatestOrderTime;}}
        private PropertyExpression _NotCompletedOrderCount;
        /// <summary>
        /// 未完成订单数,
        /// </summary>
        public PropertyExpression NotCompletedOrderCount { get{return _NotCompletedOrderCount;}}
        private PropertyExpression _UpdateTime;
        /// <summary>
        /// 修改时间,
        /// </summary>
        public PropertyExpression UpdateTime { get{return _UpdateTime;}}
        private PropertyExpression _FinanceRemark;
        /// <summary>
        /// 财务备注,
        /// </summary>
        public PropertyExpression FinanceRemark { get{return _FinanceRemark;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private CompanyDescriptor _GlobalCompany;
        public CompanyDescriptor GlobalCompany 
        { 
            get
            {
                if(_GlobalCompany==null) _GlobalCompany=new CompanyDescriptor(base.Prefix+"GlobalCompany.");
                return _GlobalCompany;
            }
        }
        private AreaDescriptor _Area;
        public AreaDescriptor Area 
        { 
            get
            {
                if(_Area==null) _Area=new AreaDescriptor(base.Prefix+"Area.");
                return _Area;
            }
        }
        private CustomerLevelDescriptor _CustomerLevel;
        public CustomerLevelDescriptor CustomerLevel 
        { 
            get
            {
                if(_CustomerLevel==null) _CustomerLevel=new CustomerLevelDescriptor(base.Prefix+"CustomerLevel.");
                return _CustomerLevel;
            }
        }
        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region Customers
    /// <summary>
    /// Customer,
    /// </summary>
    [Table]
    public partial class Customers:EntityList<Customer> 
    {
        
    }
    #endregion


    #region CustomerAddress
    /// <summary>
    /// CustomerAddress,客户收货地址
    /// </summary>
    [Table]
    public partial class CustomerAddress 
    {
        
        public CustomerAddress()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// Id主键,
        /// </summary>
        [DisplayName("Id主键")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="Id主键不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CustomerAddressId {  get; set; }


        /// <summary>
        /// 客户Id,
        /// </summary>
        [DisplayName("客户Id")]
        [Column()]
[Required(ErrorMessage="客户Id不允许空")]
 
        public long CustomerId {  get; set; }


        /// <summary>
        /// 收货地区,
        /// </summary>
        [DisplayName("收货地区")]
        [Column()]
[Required(ErrorMessage="收货地区不允许空")]
 
        public long AreaId {  get; set; }


        /// <summary>
        /// 地址,
        /// </summary>
        [DisplayName("地址")]
        [Column(Size = 200)]
[Required(ErrorMessage="地址不允许空")]
[MaxLength(200,ErrorMessage="地址不能超过200个字")]
 
        public string Address {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 联系电话,
        /// </summary>
        [DisplayName("联系电话")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系电话不能超过20个字")]
 
        public string Phone {  get; set; }


        /// <summary>
        /// 邮编,
        /// </summary>
        [DisplayName("邮编")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="邮编不能超过20个字")]
 
        public string ZipCode {  get; set; }


        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        [DisplayName("是否已标记地图")]
        [Column()]
[Required(ErrorMessage="是否已标记地图不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column()]
[Required(ErrorMessage="X不允许空")]
 
        public float X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column()]
[Required(ErrorMessage="Y不允许空")]
 
        public float Y {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// CustomerAddress.Customer,
        /// </summary>
        [Relation("this.CustomerId=out.CustomerId")]
        public Customer Customer { get;  set;  } 



        #endregion
    }
    #endregion
    #region CustomerAddressProperties
    public static partial class CustomerAddress_
    {
    
        private static CustomerAddressDescriptor instance = new CustomerAddressDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// Id主键,
        /// </summary>
        public static PropertyExpression CustomerAddressId { get{return instance.CustomerAddressId;}} 
        /// <summary>
        /// 客户Id,
        /// </summary>
        public static PropertyExpression CustomerId { get{return instance.CustomerId;}} 
        /// <summary>
        /// 收货地区,
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 地址,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 联系电话,
        /// </summary>
        public static PropertyExpression Phone { get{return instance.Phone;}} 
        /// <summary>
        /// 邮编,
        /// </summary>
        public static PropertyExpression ZipCode { get{return instance.ZipCode;}} 
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}}


 
        /// <summary>
        /// CustomerAddress.Customer,
        /// </summary>
        public static CustomerDescriptor Customer { get{return instance.Customer;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CustomerAddressDescriptor
    public partial class CustomerAddressDescriptor:ObjectDescriptorBase
    {
     
        public CustomerAddressDescriptor(string prefix):base(prefix)
        {  
    
            this._CustomerAddressId = new PropertyExpression(prefix + "CustomerAddressId");
            this._CustomerId = new PropertyExpression(prefix + "CustomerId");
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._Address = new PropertyExpression(prefix + "Address");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Phone = new PropertyExpression(prefix + "Phone");
            this._ZipCode = new PropertyExpression(prefix + "ZipCode");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            ALL = new PropertyExpression[] {this._CustomerAddressId,this._CustomerId,this._AreaId,this._Address,this._ContactName,this._Phone,this._ZipCode,this._IsMapped,this._X,this._Y};
        }
         

        private PropertyExpression _CustomerAddressId;
        /// <summary>
        /// Id主键,
        /// </summary>
        public PropertyExpression CustomerAddressId { get{return _CustomerAddressId;}}
        private PropertyExpression _CustomerId;
        /// <summary>
        /// 客户Id,
        /// </summary>
        public PropertyExpression CustomerId { get{return _CustomerId;}}
        private PropertyExpression _AreaId;
        /// <summary>
        /// 收货地区,
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 地址,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Phone;
        /// <summary>
        /// 联系电话,
        /// </summary>
        public PropertyExpression Phone { get{return _Phone;}}
        private PropertyExpression _ZipCode;
        /// <summary>
        /// 邮编,
        /// </summary>
        public PropertyExpression ZipCode { get{return _ZipCode;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}



        private CustomerDescriptor _Customer;
        public CustomerDescriptor Customer 
        { 
            get
            {
                if(_Customer==null) _Customer=new CustomerDescriptor(base.Prefix+"Customer.");
                return _Customer;
            }
        }
    }
     #endregion


    #region CustomerAddresss
    /// <summary>
    /// CustomerAddress,客户收货地址
    /// </summary>
    [Table]
    public partial class CustomerAddresss:EntityList<CustomerAddress> 
    {
        
    }
    #endregion


    #region CustomerTrace
    /// <summary>
    /// CustomerTrace,客户商品跟踪
    /// </summary>
    [Table]
    public partial class CustomerTrace 
    {
        
        public CustomerTrace()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// CustomerId,
        /// </summary>
        [DisplayName("CustomerId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="CustomerId不允许空")]
 
        public long CustomerId {  get; set; }


        /// <summary>
        /// ProductId,
        /// </summary>
        [DisplayName("ProductId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="ProductId不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// Price,
        /// </summary>
        [DisplayName("Price")]
        [Column()]
 
        public string Price {  get; set; }


        /// <summary>
        /// CustomerProductNo,
        /// </summary>
        [DisplayName("CustomerProductNo")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="CustomerProductNo不能超过30个字")]
 
        public string CustomerProductNo {  get; set; }


        #endregion

    }
    #endregion
    #region CustomerTraceProperties
    public static partial class CustomerTrace_
    {
    
        private static CustomerTraceDescriptor instance = new CustomerTraceDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// CustomerId,
        /// </summary>
        public static PropertyExpression CustomerId { get{return instance.CustomerId;}} 
        /// <summary>
        /// ProductId,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// Price,
        /// </summary>
        public static PropertyExpression Price { get{return instance.Price;}} 
        /// <summary>
        /// CustomerProductNo,
        /// </summary>
        public static PropertyExpression CustomerProductNo { get{return instance.CustomerProductNo;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CustomerTraceDescriptor
    public partial class CustomerTraceDescriptor:ObjectDescriptorBase
    {
     
        public CustomerTraceDescriptor(string prefix):base(prefix)
        {  
    
            this._CustomerId = new PropertyExpression(prefix + "CustomerId");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._Price = new PropertyExpression(prefix + "Price");
            this._CustomerProductNo = new PropertyExpression(prefix + "CustomerProductNo");
            ALL = new PropertyExpression[] {this._CustomerId,this._ProductId,this._Price,this._CustomerProductNo};
        }
         

        private PropertyExpression _CustomerId;
        /// <summary>
        /// CustomerId,
        /// </summary>
        public PropertyExpression CustomerId { get{return _CustomerId;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// ProductId,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _Price;
        /// <summary>
        /// Price,
        /// </summary>
        public PropertyExpression Price { get{return _Price;}}
        private PropertyExpression _CustomerProductNo;
        /// <summary>
        /// CustomerProductNo,
        /// </summary>
        public PropertyExpression CustomerProductNo { get{return _CustomerProductNo;}}



    }
     #endregion


    #region CustomerTraces
    /// <summary>
    /// CustomerTrace,客户商品跟踪
    /// </summary>
    [Table]
    public partial class CustomerTraces:EntityList<CustomerTrace> 
    {
        
    }
    #endregion


    #region Product
    /// <summary>
    /// Product,
    /// </summary>
    [Table]
    public partial class Product 
    {
        
        public Product()
        {

            CreateTime=DateTime.Now;
            UpdateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// ProductId,
        /// </summary>
        [DisplayName("ProductId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="ProductId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long ProductId {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 类别,标准
        /// </summary>
        [DisplayName("类别")]
        [Column()]
[Required(ErrorMessage="类别不允许空")]
 
        public long CategoryId {  get; set; }


        /// <summary>
        /// 商品编号,
        /// </summary>
        [DisplayName("商品编号")]
        [Column(Size = 30)]
[Required(ErrorMessage="商品编号不允许空")]
[MaxLength(30,ErrorMessage="商品编号不能超过30个字")]
 
        public string ProductNo {  get; set; }


        /// <summary>
        /// 商品名称,
        /// </summary>
        [DisplayName("商品名称")]
        [Column(Size = 100)]
[Required(ErrorMessage="商品名称不允许空")]
[MaxLength(100,ErrorMessage="商品名称不能超过100个字")]
 
        public string ProductName {  get; set; }


        /// <summary>
        /// 描述,
        /// </summary>
        [DisplayName("描述")]
        [Column()]
 
        public string Description {  get; set; }


        /// <summary>
        /// 条形码,标准
        /// </summary>
        [DisplayName("条形码")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="条形码不能超过30个字")]
 
        public string Barcode {  get; set; }


        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        [DisplayName("搜索缓存")]
        [Column(Size = 100)]
[Required(ErrorMessage="搜索缓存不允许空")]
[MaxLength(100,ErrorMessage="搜索缓存不能超过100个字")]
 
        public string SearchKey {  get; set; }


        /// <summary>
        /// 大图地址,标准
        /// </summary>
        [DisplayName("大图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="大图地址不能超过100个字")]
 
        public string Image400 {  get; set; }


        /// <summary>
        /// 中图地址,标准
        /// </summary>
        [DisplayName("中图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="中图地址不能超过100个字")]
 
        public string Image200 {  get; set; }


        /// <summary>
        /// 小图地址,标准
        /// </summary>
        [DisplayName("小图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="小图地址不能超过100个字")]
 
        public string Image60 {  get; set; }


        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        [DisplayName("图片Id")]
        [Column()]
[Required(ErrorMessage="图片Id不允许空")]
 
        public long ImageFileId {  get; set; }


        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        [DisplayName("品牌Id")]
        [Column()]
[Required(ErrorMessage="品牌Id不允许空")]
 
        public long BrandId {  get; set; }


        /// <summary>
        /// 品牌,标准
        /// </summary>
        [DisplayName("品牌")]
        [Column(Size = 30)]
[Required(ErrorMessage="品牌不允许空")]
[MaxLength(30,ErrorMessage="品牌不能超过30个字")]
 
        public string BrandName {  get; set; }


        /// <summary>
        /// 单位,标准
        /// </summary>
        [DisplayName("单位")]
        [Column(Size = 10)]
[Required(ErrorMessage="单位不允许空")]
[MaxLength(10,ErrorMessage="单位不能超过10个字")]
 
        public string Unit {  get; set; }


        /// <summary>
        /// 保质期,标准
        /// </summary>
        [DisplayName("保质期")]
        [Column()]
[Required(ErrorMessage="保质期不允许空")]
 
        public long ShelfLife {  get; set; }


        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        [DisplayName("保质期单位")]
        [Column()]
[Required(ErrorMessage="保质期单位不允许空")]
 
        public ShelfLifeUnit ShelfLifeUnitId {  get; set; }


        /// <summary>
        /// 是否进口,标准
        /// </summary>
        [DisplayName("是否进口")]
        [Column()]
[Required(ErrorMessage="是否进口不允许空")]
 
        public bool IsImported {  get; set; }


        /// <summary>
        /// 标准售价,
        /// </summary>
        [DisplayName("标准售价")]
        [Column(Size = 20)]
[Required(ErrorMessage="标准售价不允许空")]
 
        public decimal Price {  get; set; }


        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        [DisplayName("起订量")]
        [Column(Size = 20)]
[Required(ErrorMessage="起订量不允许空")]
 
        public decimal MinQuantity {  get; set; }


        /// <summary>
        /// 库存数量,
        /// </summary>
        [DisplayName("库存数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="库存数量不允许空")]
 
        public decimal StoreCount {  get; set; }


        /// <summary>
        /// 库存金额,
        /// </summary>
        [DisplayName("库存金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="库存金额不允许空")]
 
        public decimal StoreAmount {  get; set; }


        /// <summary>
        /// 是否线下启用,
        /// </summary>
        [DisplayName("是否线下启用")]
        [Column()]
[Required(ErrorMessage="是否线下启用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 是否线下促销,
        /// </summary>
        [DisplayName("是否线下促销")]
        [Column()]
[Required(ErrorMessage="是否线下促销不允许空")]
 
        public bool IsPromotion {  get; set; }


        /// <summary>
        /// 修改人,
        /// </summary>
        [DisplayName("修改人")]
        [Column()]
[Required(ErrorMessage="修改人不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 修改时间,
        /// </summary>
        [DisplayName("修改时间")]
        [Column()]
[Required(ErrorMessage="修改时间不允许空")]
 
        public DateTime UpdateTime {  get; set; }


        /// <summary>
        /// 包含数量,包装内包含数量
        /// </summary>
        [DisplayName("包含数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="包含数量不允许空")]
 
        public decimal PackageCount {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 300)]
[MaxLength(300,ErrorMessage="备注不能超过300个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 锁定数量,
        /// </summary>
        [DisplayName("锁定数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="锁定数量不允许空")]
 
        public decimal LockCount {  get; set; }


        /// <summary>
        /// 可用数量,
        /// </summary>
        [DisplayName("可用数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="可用数量不允许空")]
 
        public decimal UseableCount {  get; set; }


        /// <summary>
        /// 规格,
        /// </summary>
        [DisplayName("规格")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="规格不能超过30个字")]
 
        public string Spec {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Product.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// Product.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        /// <summary>
        /// Product.Category,
        /// </summary>
        [Relation("this.CategoryId=out.CategoryId")]
        public Category Category { get;  set;  } 



        /// <summary>
        /// Product.Brand,
        /// </summary>
        [Relation("this.BrandId=out.BrandId")]
        public Brand Brand { get;  set;  } 



        #endregion
    }
    #endregion
    #region ProductProperties
    public static partial class Product_
    {
    
        private static ProductDescriptor instance = new ProductDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// ProductId,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 类别,标准
        /// </summary>
        public static PropertyExpression CategoryId { get{return instance.CategoryId;}} 
        /// <summary>
        /// 商品编号,
        /// </summary>
        public static PropertyExpression ProductNo { get{return instance.ProductNo;}} 
        /// <summary>
        /// 商品名称,
        /// </summary>
        public static PropertyExpression ProductName { get{return instance.ProductName;}} 
        /// <summary>
        /// 描述,
        /// </summary>
        public static PropertyExpression Description { get{return instance.Description;}} 
        /// <summary>
        /// 条形码,标准
        /// </summary>
        public static PropertyExpression Barcode { get{return instance.Barcode;}} 
        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        public static PropertyExpression SearchKey { get{return instance.SearchKey;}} 
        /// <summary>
        /// 大图地址,标准
        /// </summary>
        public static PropertyExpression Image400 { get{return instance.Image400;}} 
        /// <summary>
        /// 中图地址,标准
        /// </summary>
        public static PropertyExpression Image200 { get{return instance.Image200;}} 
        /// <summary>
        /// 小图地址,标准
        /// </summary>
        public static PropertyExpression Image60 { get{return instance.Image60;}} 
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public static PropertyExpression ImageFileId { get{return instance.ImageFileId;}} 
        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        public static PropertyExpression BrandId { get{return instance.BrandId;}} 
        /// <summary>
        /// 品牌,标准
        /// </summary>
        public static PropertyExpression BrandName { get{return instance.BrandName;}} 
        /// <summary>
        /// 单位,标准
        /// </summary>
        public static PropertyExpression Unit { get{return instance.Unit;}} 
        /// <summary>
        /// 保质期,标准
        /// </summary>
        public static PropertyExpression ShelfLife { get{return instance.ShelfLife;}} 
        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        public static PropertyExpression ShelfLifeUnitId { get{return instance.ShelfLifeUnitId;}} 
        /// <summary>
        /// 是否进口,标准
        /// </summary>
        public static PropertyExpression IsImported { get{return instance.IsImported;}} 
        /// <summary>
        /// 标准售价,
        /// </summary>
        public static PropertyExpression Price { get{return instance.Price;}} 
        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        public static PropertyExpression MinQuantity { get{return instance.MinQuantity;}} 
        /// <summary>
        /// 库存数量,
        /// </summary>
        public static PropertyExpression StoreCount { get{return instance.StoreCount;}} 
        /// <summary>
        /// 库存金额,
        /// </summary>
        public static PropertyExpression StoreAmount { get{return instance.StoreAmount;}} 
        /// <summary>
        /// 是否线下启用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 是否线下促销,
        /// </summary>
        public static PropertyExpression IsPromotion { get{return instance.IsPromotion;}} 
        /// <summary>
        /// 修改人,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 修改时间,
        /// </summary>
        public static PropertyExpression UpdateTime { get{return instance.UpdateTime;}} 
        /// <summary>
        /// 包含数量,包装内包含数量
        /// </summary>
        public static PropertyExpression PackageCount { get{return instance.PackageCount;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 锁定数量,
        /// </summary>
        public static PropertyExpression LockCount { get{return instance.LockCount;}} 
        /// <summary>
        /// 可用数量,
        /// </summary>
        public static PropertyExpression UseableCount { get{return instance.UseableCount;}} 
        /// <summary>
        /// 规格,
        /// </summary>
        public static PropertyExpression Spec { get{return instance.Spec;}}


 
        /// <summary>
        /// Product.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// Product.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}} 
        /// <summary>
        /// Product.Category,
        /// </summary>
        public static CategoryDescriptor Category { get{return instance.Category;}} 
        /// <summary>
        /// Product.Brand,
        /// </summary>
        public static BrandDescriptor Brand { get{return instance.Brand;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ProductDescriptor
    public partial class ProductDescriptor:ObjectDescriptorBase
    {
     
        public ProductDescriptor(string prefix):base(prefix)
        {  
    
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._CategoryId = new PropertyExpression(prefix + "CategoryId");
            this._ProductNo = new PropertyExpression(prefix + "ProductNo");
            this._ProductName = new PropertyExpression(prefix + "ProductName");
            this._Description = new PropertyExpression(prefix + "Description");
            this._Barcode = new PropertyExpression(prefix + "Barcode");
            this._SearchKey = new PropertyExpression(prefix + "SearchKey");
            this._Image400 = new PropertyExpression(prefix + "Image400");
            this._Image200 = new PropertyExpression(prefix + "Image200");
            this._Image60 = new PropertyExpression(prefix + "Image60");
            this._ImageFileId = new PropertyExpression(prefix + "ImageFileId");
            this._BrandId = new PropertyExpression(prefix + "BrandId");
            this._BrandName = new PropertyExpression(prefix + "BrandName");
            this._Unit = new PropertyExpression(prefix + "Unit");
            this._ShelfLife = new PropertyExpression(prefix + "ShelfLife");
            this._ShelfLifeUnitId = new PropertyExpression(prefix + "ShelfLifeUnitId");
            this._IsImported = new PropertyExpression(prefix + "IsImported");
            this._Price = new PropertyExpression(prefix + "Price");
            this._MinQuantity = new PropertyExpression(prefix + "MinQuantity");
            this._StoreCount = new PropertyExpression(prefix + "StoreCount");
            this._StoreAmount = new PropertyExpression(prefix + "StoreAmount");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._IsPromotion = new PropertyExpression(prefix + "IsPromotion");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._UpdateTime = new PropertyExpression(prefix + "UpdateTime");
            this._PackageCount = new PropertyExpression(prefix + "PackageCount");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._LockCount = new PropertyExpression(prefix + "LockCount");
            this._UseableCount = new PropertyExpression(prefix + "UseableCount");
            this._Spec = new PropertyExpression(prefix + "Spec");
            ALL = new PropertyExpression[] {this._ProductId,this._CompanyId,this._CategoryId,this._ProductNo,this._ProductName,this._Description,this._Barcode,this._SearchKey,this._Image400,this._Image200,this._Image60,this._ImageFileId,this._BrandId,this._BrandName,this._Unit,this._ShelfLife,this._ShelfLifeUnitId,this._IsImported,this._Price,this._MinQuantity,this._StoreCount,this._StoreAmount,this._IsActive,this._IsPromotion,this._EmployeeId,this._CreateTime,this._UpdateTime,this._PackageCount,this._Remark,this._LockCount,this._UseableCount,this._Spec};
        }
         

        private PropertyExpression _ProductId;
        /// <summary>
        /// ProductId,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _CategoryId;
        /// <summary>
        /// 类别,标准
        /// </summary>
        public PropertyExpression CategoryId { get{return _CategoryId;}}
        private PropertyExpression _ProductNo;
        /// <summary>
        /// 商品编号,
        /// </summary>
        public PropertyExpression ProductNo { get{return _ProductNo;}}
        private PropertyExpression _ProductName;
        /// <summary>
        /// 商品名称,
        /// </summary>
        public PropertyExpression ProductName { get{return _ProductName;}}
        private PropertyExpression _Description;
        /// <summary>
        /// 描述,
        /// </summary>
        public PropertyExpression Description { get{return _Description;}}
        private PropertyExpression _Barcode;
        /// <summary>
        /// 条形码,标准
        /// </summary>
        public PropertyExpression Barcode { get{return _Barcode;}}
        private PropertyExpression _SearchKey;
        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        public PropertyExpression SearchKey { get{return _SearchKey;}}
        private PropertyExpression _Image400;
        /// <summary>
        /// 大图地址,标准
        /// </summary>
        public PropertyExpression Image400 { get{return _Image400;}}
        private PropertyExpression _Image200;
        /// <summary>
        /// 中图地址,标准
        /// </summary>
        public PropertyExpression Image200 { get{return _Image200;}}
        private PropertyExpression _Image60;
        /// <summary>
        /// 小图地址,标准
        /// </summary>
        public PropertyExpression Image60 { get{return _Image60;}}
        private PropertyExpression _ImageFileId;
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public PropertyExpression ImageFileId { get{return _ImageFileId;}}
        private PropertyExpression _BrandId;
        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        public PropertyExpression BrandId { get{return _BrandId;}}
        private PropertyExpression _BrandName;
        /// <summary>
        /// 品牌,标准
        /// </summary>
        public PropertyExpression BrandName { get{return _BrandName;}}
        private PropertyExpression _Unit;
        /// <summary>
        /// 单位,标准
        /// </summary>
        public PropertyExpression Unit { get{return _Unit;}}
        private PropertyExpression _ShelfLife;
        /// <summary>
        /// 保质期,标准
        /// </summary>
        public PropertyExpression ShelfLife { get{return _ShelfLife;}}
        private PropertyExpression _ShelfLifeUnitId;
        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        public PropertyExpression ShelfLifeUnitId { get{return _ShelfLifeUnitId;}}
        private PropertyExpression _IsImported;
        /// <summary>
        /// 是否进口,标准
        /// </summary>
        public PropertyExpression IsImported { get{return _IsImported;}}
        private PropertyExpression _Price;
        /// <summary>
        /// 标准售价,
        /// </summary>
        public PropertyExpression Price { get{return _Price;}}
        private PropertyExpression _MinQuantity;
        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        public PropertyExpression MinQuantity { get{return _MinQuantity;}}
        private PropertyExpression _StoreCount;
        /// <summary>
        /// 库存数量,
        /// </summary>
        public PropertyExpression StoreCount { get{return _StoreCount;}}
        private PropertyExpression _StoreAmount;
        /// <summary>
        /// 库存金额,
        /// </summary>
        public PropertyExpression StoreAmount { get{return _StoreAmount;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否线下启用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _IsPromotion;
        /// <summary>
        /// 是否线下促销,
        /// </summary>
        public PropertyExpression IsPromotion { get{return _IsPromotion;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 修改人,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _UpdateTime;
        /// <summary>
        /// 修改时间,
        /// </summary>
        public PropertyExpression UpdateTime { get{return _UpdateTime;}}
        private PropertyExpression _PackageCount;
        /// <summary>
        /// 包含数量,包装内包含数量
        /// </summary>
        public PropertyExpression PackageCount { get{return _PackageCount;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _LockCount;
        /// <summary>
        /// 锁定数量,
        /// </summary>
        public PropertyExpression LockCount { get{return _LockCount;}}
        private PropertyExpression _UseableCount;
        /// <summary>
        /// 可用数量,
        /// </summary>
        public PropertyExpression UseableCount { get{return _UseableCount;}}
        private PropertyExpression _Spec;
        /// <summary>
        /// 规格,
        /// </summary>
        public PropertyExpression Spec { get{return _Spec;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
        private CategoryDescriptor _Category;
        public CategoryDescriptor Category 
        { 
            get
            {
                if(_Category==null) _Category=new CategoryDescriptor(base.Prefix+"Category.");
                return _Category;
            }
        }
        private BrandDescriptor _Brand;
        public BrandDescriptor Brand 
        { 
            get
            {
                if(_Brand==null) _Brand=new BrandDescriptor(base.Prefix+"Brand.");
                return _Brand;
            }
        }
    }
     #endregion


    #region Products
    /// <summary>
    /// Product,
    /// </summary>
    [Table]
    public partial class Products:EntityList<Product> 
    {
        
    }
    #endregion


    #region Brand
    /// <summary>
    /// Brand,品牌
    /// </summary>
    [Table]
    public partial class Brand 
    {
        
        public Brand()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// BrandId,
        /// </summary>
        [DisplayName("BrandId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="BrandId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long BrandId {  get; set; }


        /// <summary>
        /// BrandName,
        /// </summary>
        [DisplayName("BrandName")]
        [Column(Size = 20)]
[Required(ErrorMessage="BrandName不允许空")]
[MaxLength(20,ErrorMessage="BrandName不能超过20个字")]
 
        public string BrandName {  get; set; }


        #endregion

    }
    #endregion
    #region BrandProperties
    public static partial class Brand_
    {
    
        private static BrandDescriptor instance = new BrandDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// BrandId,
        /// </summary>
        public static PropertyExpression BrandId { get{return instance.BrandId;}} 
        /// <summary>
        /// BrandName,
        /// </summary>
        public static PropertyExpression BrandName { get{return instance.BrandName;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region BrandDescriptor
    public partial class BrandDescriptor:ObjectDescriptorBase
    {
     
        public BrandDescriptor(string prefix):base(prefix)
        {  
    
            this._BrandId = new PropertyExpression(prefix + "BrandId");
            this._BrandName = new PropertyExpression(prefix + "BrandName");
            ALL = new PropertyExpression[] {this._BrandId,this._BrandName};
        }
         

        private PropertyExpression _BrandId;
        /// <summary>
        /// BrandId,
        /// </summary>
        public PropertyExpression BrandId { get{return _BrandId;}}
        private PropertyExpression _BrandName;
        /// <summary>
        /// BrandName,
        /// </summary>
        public PropertyExpression BrandName { get{return _BrandName;}}



    }
     #endregion


    #region Brands
    /// <summary>
    /// Brand,品牌
    /// </summary>
    [Table]
    public partial class Brands:EntityList<Brand> 
    {
        
    }
    #endregion


    #region StoreProduct
    /// <summary>
    /// StoreProduct,商品库存
    /// </summary>
    [Table]
    public partial class StoreProduct 
    {
        
        public StoreProduct()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 仓库,
        /// </summary>
        [DisplayName("仓库")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="仓库不允许空")]
 
        public long StoreId {  get; set; }


        /// <summary>
        /// 商品,
        /// </summary>
        [DisplayName("商品")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="商品不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 合格状态,
        /// </summary>
        [DisplayName("合格状态")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="合格状态不允许空")]
 
        public QualityStyle QualityStyleId {  get; set; }


        /// <summary>
        /// 批号,
        /// </summary>
        [DisplayName("批号")]
        [Column(IsPrimaryKey = true,Size = 50)]
[Required(ErrorMessage="批号不允许空")]
[MaxLength(50,ErrorMessage="批号不能超过50个字")]
 
        public string LotNo {  get; set; }


        /// <summary>
        /// 可用数量,
        /// </summary>
        [DisplayName("可用数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="可用数量不允许空")]
 
        public decimal UseableQuantity {  get; set; }


        /// <summary>
        /// 锁定数量,
        /// </summary>
        [DisplayName("锁定数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="锁定数量不允许空")]
 
        public decimal LockQuantity {  get; set; }


        /// <summary>
        /// 总数,
        /// </summary>
        [DisplayName("总数")]
        [Column(Size = 20)]
[Required(ErrorMessage="总数不允许空")]
 
        public decimal Quantity {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// StoreProduct.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        /// <summary>
        /// StoreProduct.Store,
        /// </summary>
        [Relation("this.StoreId=out.StoreId")]
        public Store Store { get;  set;  } 



        #endregion
    }
    #endregion
    #region StoreProductProperties
    public static partial class StoreProduct_
    {
    
        private static StoreProductDescriptor instance = new StoreProductDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 仓库,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}} 
        /// <summary>
        /// 商品,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 合格状态,
        /// </summary>
        public static PropertyExpression QualityStyleId { get{return instance.QualityStyleId;}} 
        /// <summary>
        /// 批号,
        /// </summary>
        public static PropertyExpression LotNo { get{return instance.LotNo;}} 
        /// <summary>
        /// 可用数量,
        /// </summary>
        public static PropertyExpression UseableQuantity { get{return instance.UseableQuantity;}} 
        /// <summary>
        /// 锁定数量,
        /// </summary>
        public static PropertyExpression LockQuantity { get{return instance.LockQuantity;}} 
        /// <summary>
        /// 总数,
        /// </summary>
        public static PropertyExpression Quantity { get{return instance.Quantity;}}


 
        /// <summary>
        /// StoreProduct.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}} 
        /// <summary>
        /// StoreProduct.Store,
        /// </summary>
        public static StoreDescriptor Store { get{return instance.Store;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region StoreProductDescriptor
    public partial class StoreProductDescriptor:ObjectDescriptorBase
    {
     
        public StoreProductDescriptor(string prefix):base(prefix)
        {  
    
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._QualityStyleId = new PropertyExpression(prefix + "QualityStyleId");
            this._LotNo = new PropertyExpression(prefix + "LotNo");
            this._UseableQuantity = new PropertyExpression(prefix + "UseableQuantity");
            this._LockQuantity = new PropertyExpression(prefix + "LockQuantity");
            this._Quantity = new PropertyExpression(prefix + "Quantity");
            ALL = new PropertyExpression[] {this._StoreId,this._ProductId,this._QualityStyleId,this._LotNo,this._UseableQuantity,this._LockQuantity,this._Quantity};
        }
         

        private PropertyExpression _StoreId;
        /// <summary>
        /// 仓库,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// 商品,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _QualityStyleId;
        /// <summary>
        /// 合格状态,
        /// </summary>
        public PropertyExpression QualityStyleId { get{return _QualityStyleId;}}
        private PropertyExpression _LotNo;
        /// <summary>
        /// 批号,
        /// </summary>
        public PropertyExpression LotNo { get{return _LotNo;}}
        private PropertyExpression _UseableQuantity;
        /// <summary>
        /// 可用数量,
        /// </summary>
        public PropertyExpression UseableQuantity { get{return _UseableQuantity;}}
        private PropertyExpression _LockQuantity;
        /// <summary>
        /// 锁定数量,
        /// </summary>
        public PropertyExpression LockQuantity { get{return _LockQuantity;}}
        private PropertyExpression _Quantity;
        /// <summary>
        /// 总数,
        /// </summary>
        public PropertyExpression Quantity { get{return _Quantity;}}



        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
        private StoreDescriptor _Store;
        public StoreDescriptor Store 
        { 
            get
            {
                if(_Store==null) _Store=new StoreDescriptor(base.Prefix+"Store.");
                return _Store;
            }
        }
    }
     #endregion


    #region StoreProducts
    /// <summary>
    /// StoreProduct,商品库存
    /// </summary>
    [Table]
    public partial class StoreProducts:EntityList<StoreProduct> 
    {
        
    }
    #endregion


    #region Store
    /// <summary>
    /// Store,仓库
    /// </summary>
    [Table]
    public partial class Store 
    {
        
        public Store()
        {

            CreateTime=DateTime.Now;
            UpdateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// StoreId,
        /// </summary>
        [DisplayName("StoreId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="StoreId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long StoreId {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
 
        public long? CompanyId {  get; set; }


        /// <summary>
        /// 仓库名称,
        /// </summary>
        [DisplayName("仓库名称")]
        [Column(Size = 30)]
[Required(ErrorMessage="仓库名称不允许空")]
[MaxLength(30,ErrorMessage="仓库名称不能超过30个字")]
 
        public string StoreName {  get; set; }


        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        [DisplayName("是否已标记地图")]
        [Column()]
[Required(ErrorMessage="是否已标记地图不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column()]
[Required(ErrorMessage="X不允许空")]
 
        public float X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column()]
[Required(ErrorMessage="Y不允许空")]
 
        public float Y {  get; set; }


        /// <summary>
        /// 是否启用,
        /// </summary>
        [DisplayName("是否启用")]
        [Column()]
[Required(ErrorMessage="是否启用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 300)]
[MaxLength(300,ErrorMessage="备注不能超过300个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 修改人,
        /// </summary>
        [DisplayName("修改人")]
        [Column()]
[Required(ErrorMessage="修改人不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 修改时间,
        /// </summary>
        [DisplayName("修改时间")]
        [Column()]
[Required(ErrorMessage="修改时间不允许空")]
 
        public DateTime UpdateTime {  get; set; }


        /// <summary>
        /// 地理位置,
        /// </summary>
        [DisplayName("地理位置")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="地理位置不能超过200个字")]
 
        public string Address {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Store.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// Store.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region StoreProperties
    public static partial class Store_
    {
    
        private static StoreDescriptor instance = new StoreDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// StoreId,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 仓库名称,
        /// </summary>
        public static PropertyExpression StoreName { get{return instance.StoreName;}} 
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// 是否启用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 修改人,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 修改时间,
        /// </summary>
        public static PropertyExpression UpdateTime { get{return instance.UpdateTime;}} 
        /// <summary>
        /// 地理位置,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}}


 
        /// <summary>
        /// Store.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// Store.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region StoreDescriptor
    public partial class StoreDescriptor:ObjectDescriptorBase
    {
     
        public StoreDescriptor(string prefix):base(prefix)
        {  
    
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._StoreName = new PropertyExpression(prefix + "StoreName");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._UpdateTime = new PropertyExpression(prefix + "UpdateTime");
            this._Address = new PropertyExpression(prefix + "Address");
            ALL = new PropertyExpression[] {this._StoreId,this._CompanyId,this._StoreName,this._IsMapped,this._X,this._Y,this._IsActive,this._Remark,this._EmployeeId,this._CreateTime,this._UpdateTime,this._Address};
        }
         

        private PropertyExpression _StoreId;
        /// <summary>
        /// StoreId,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _StoreName;
        /// <summary>
        /// 仓库名称,
        /// </summary>
        public PropertyExpression StoreName { get{return _StoreName;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否启用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 修改人,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _UpdateTime;
        /// <summary>
        /// 修改时间,
        /// </summary>
        public PropertyExpression UpdateTime { get{return _UpdateTime;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 地理位置,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region Stores
    /// <summary>
    /// Store,仓库
    /// </summary>
    [Table]
    public partial class Stores:EntityList<Store> 
    {
        
    }
    #endregion


    #region SalesOrder
    /// <summary>
    /// SalesOrder,销售订单
    /// </summary>
    [Table]
    public partial class SalesOrder 
    {
        
        public SalesOrder()
        {

            CreateTime=DateTime.Now;
            PlanDeliveryTime=DateTime.Now;
            DeliveryTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// SalesOrderId,
        /// </summary>
        [DisplayName("SalesOrderId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="SalesOrderId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long SalesOrderId {  get; set; }


        /// <summary>
        /// 订单号,
        /// </summary>
        [DisplayName("订单号")]
        [Column(Size = 30)]
[Required(ErrorMessage="订单号不允许空")]
[MaxLength(30,ErrorMessage="订单号不能超过30个字")]
 
        public string SalesOrderNo {  get; set; }


        /// <summary>
        /// 订单类别,
        /// </summary>
        [DisplayName("订单类别")]
        [Column()]
 
        public long? SalesOrderTypeId {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 客户,
        /// </summary>
        [DisplayName("客户")]
        [Column()]
[Required(ErrorMessage="客户不允许空")]
 
        public long CustomerId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 业务员,
        /// </summary>
        [DisplayName("业务员")]
        [Column()]
[Required(ErrorMessage="业务员不允许空")]
 
        public long OrderEmployeeId {  get; set; }


        /// <summary>
        /// 收货地址,
        /// </summary>
        [DisplayName("收货地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="收货地址不能超过200个字")]
 
        public string Address {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 联系电话,
        /// </summary>
        [DisplayName("联系电话")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系电话不能超过20个字")]
 
        public string Phone {  get; set; }


        /// <summary>
        /// 是否已在地图上标记,
        /// </summary>
        [DisplayName("是否已在地图上标记")]
        [Column()]
[Required(ErrorMessage="是否已在地图上标记不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column(Size = 20)]
[Required(ErrorMessage="X不允许空")]
 
        public decimal X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column(Size = 20)]
[Required(ErrorMessage="Y不允许空")]
 
        public decimal Y {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 优惠前金额,
        /// </summary>
        [DisplayName("优惠前金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="优惠前金额不允许空")]
 
        public decimal Amount {  get; set; }


        /// <summary>
        /// 优惠金额,
        /// </summary>
        [DisplayName("优惠金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="优惠金额不允许空")]
 
        public decimal FavourableAmount {  get; set; }


        /// <summary>
        /// 优惠描述,
        /// </summary>
        [DisplayName("优惠描述")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="优惠描述不能超过200个字")]
 
        public string FavourableDescription {  get; set; }


        /// <summary>
        /// 实际订单金额,
        /// </summary>
        [DisplayName("实际订单金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="实际订单金额不允许空")]
 
        public decimal ActualAmount {  get; set; }


        /// <summary>
        /// 交货类型,
        /// </summary>
        [DisplayName("交货类型")]
        [Column()]
[Required(ErrorMessage="交货类型不允许空")]
 
        public DeliveryType DeliveryTypeId {  get; set; }


        /// <summary>
        /// 交货状态,
        /// </summary>
        [DisplayName("交货状态")]
        [Column()]
[Required(ErrorMessage="交货状态不允许空")]
 
        public DeliveryStatus DeliveryStatusId {  get; set; }


        /// <summary>
        /// 配送时间,
        /// </summary>
        [DisplayName("配送时间")]
        [Column()]
[Required(ErrorMessage="配送时间不允许空")]
 
        public DateTime PlanDeliveryTime {  get; set; }


        /// <summary>
        /// 实际交货时间,
        /// </summary>
        [DisplayName("实际交货时间")]
        [Column()]
[Required(ErrorMessage="实际交货时间不允许空")]
 
        public DateTime DeliveryTime {  get; set; }


        /// <summary>
        /// 物流备注,
        /// </summary>
        [DisplayName("物流备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="物流备注不能超过200个字")]
 
        public string DeliveryRemark {  get; set; }


        /// <summary>
        /// 已结算金额,
        /// </summary>
        [DisplayName("已结算金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="已结算金额不允许空")]
 
        public decimal SettleedAmount {  get; set; }


        /// <summary>
        /// 未结算金额,
        /// </summary>
        [DisplayName("未结算金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="未结算金额不允许空")]
 
        public decimal UnSettleedAmount {  get; set; }


        /// <summary>
        /// 结算状态,
        /// </summary>
        [DisplayName("结算状态")]
        [Column()]
[Required(ErrorMessage="结算状态不允许空")]
 
        public SettleStatus SettleStatusId {  get; set; }


        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        [DisplayName("是否草稿订单")]
        [Column()]
[Required(ErrorMessage="是否草稿订单不允许空")]
 
        public bool IsDraft {  get; set; }


        /// <summary>
        /// 是否结束,
        /// </summary>
        [DisplayName("是否结束")]
        [Column()]
[Required(ErrorMessage="是否结束不允许空")]
 
        public bool IsCompleted {  get; set; }


        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        [DisplayName("是否实收数平衡")]
        [Column()]
[Required(ErrorMessage="是否实收数平衡不允许空")]
 
        public bool IsDeliveryBalance {  get; set; }


        /// <summary>
        /// 仓库,
        /// </summary>
        [DisplayName("仓库")]
        [Column()]
[Required(ErrorMessage="仓库不允许空")]
 
        public long StoreId {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// SalesOrder.OrderEmployee,
        /// </summary>
        [Relation("this.OrderEmployeeId=out.EmployeeId")]
        public Employee OrderEmployee { get;  set;  } 



        /// <summary>
        /// SalesOrder.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// SalesOrder.Customer,
        /// </summary>
        [Relation("this.CustomerId=out.CustomerId")]
        public Customer Customer { get;  set;  } 



        /// <summary>
        /// SalesOrder.Store,
        /// </summary>
        [Relation("this.StoreId=out.StoreId")]
        public Store Store { get;  set;  } 



        #endregion
    }
    #endregion
    #region SalesOrderProperties
    public static partial class SalesOrder_
    {
    
        private static SalesOrderDescriptor instance = new SalesOrderDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// SalesOrderId,
        /// </summary>
        public static PropertyExpression SalesOrderId { get{return instance.SalesOrderId;}} 
        /// <summary>
        /// 订单号,
        /// </summary>
        public static PropertyExpression SalesOrderNo { get{return instance.SalesOrderNo;}} 
        /// <summary>
        /// 订单类别,
        /// </summary>
        public static PropertyExpression SalesOrderTypeId { get{return instance.SalesOrderTypeId;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 客户,
        /// </summary>
        public static PropertyExpression CustomerId { get{return instance.CustomerId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 业务员,
        /// </summary>
        public static PropertyExpression OrderEmployeeId { get{return instance.OrderEmployeeId;}} 
        /// <summary>
        /// 收货地址,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 联系电话,
        /// </summary>
        public static PropertyExpression Phone { get{return instance.Phone;}} 
        /// <summary>
        /// 是否已在地图上标记,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 优惠前金额,
        /// </summary>
        public static PropertyExpression Amount { get{return instance.Amount;}} 
        /// <summary>
        /// 优惠金额,
        /// </summary>
        public static PropertyExpression FavourableAmount { get{return instance.FavourableAmount;}} 
        /// <summary>
        /// 优惠描述,
        /// </summary>
        public static PropertyExpression FavourableDescription { get{return instance.FavourableDescription;}} 
        /// <summary>
        /// 实际订单金额,
        /// </summary>
        public static PropertyExpression ActualAmount { get{return instance.ActualAmount;}} 
        /// <summary>
        /// 交货类型,
        /// </summary>
        public static PropertyExpression DeliveryTypeId { get{return instance.DeliveryTypeId;}} 
        /// <summary>
        /// 交货状态,
        /// </summary>
        public static PropertyExpression DeliveryStatusId { get{return instance.DeliveryStatusId;}} 
        /// <summary>
        /// 配送时间,
        /// </summary>
        public static PropertyExpression PlanDeliveryTime { get{return instance.PlanDeliveryTime;}} 
        /// <summary>
        /// 实际交货时间,
        /// </summary>
        public static PropertyExpression DeliveryTime { get{return instance.DeliveryTime;}} 
        /// <summary>
        /// 物流备注,
        /// </summary>
        public static PropertyExpression DeliveryRemark { get{return instance.DeliveryRemark;}} 
        /// <summary>
        /// 已结算金额,
        /// </summary>
        public static PropertyExpression SettleedAmount { get{return instance.SettleedAmount;}} 
        /// <summary>
        /// 未结算金额,
        /// </summary>
        public static PropertyExpression UnSettleedAmount { get{return instance.UnSettleedAmount;}} 
        /// <summary>
        /// 结算状态,
        /// </summary>
        public static PropertyExpression SettleStatusId { get{return instance.SettleStatusId;}} 
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public static PropertyExpression IsDraft { get{return instance.IsDraft;}} 
        /// <summary>
        /// 是否结束,
        /// </summary>
        public static PropertyExpression IsCompleted { get{return instance.IsCompleted;}} 
        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        public static PropertyExpression IsDeliveryBalance { get{return instance.IsDeliveryBalance;}} 
        /// <summary>
        /// 仓库,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}}


 
        /// <summary>
        /// SalesOrder.OrderEmployee,
        /// </summary>
        public static EmployeeDescriptor OrderEmployee { get{return instance.OrderEmployee;}} 
        /// <summary>
        /// SalesOrder.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// SalesOrder.Customer,
        /// </summary>
        public static CustomerDescriptor Customer { get{return instance.Customer;}} 
        /// <summary>
        /// SalesOrder.Store,
        /// </summary>
        public static StoreDescriptor Store { get{return instance.Store;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region SalesOrderDescriptor
    public partial class SalesOrderDescriptor:ObjectDescriptorBase
    {
     
        public SalesOrderDescriptor(string prefix):base(prefix)
        {  
    
            this._SalesOrderId = new PropertyExpression(prefix + "SalesOrderId");
            this._SalesOrderNo = new PropertyExpression(prefix + "SalesOrderNo");
            this._SalesOrderTypeId = new PropertyExpression(prefix + "SalesOrderTypeId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._CustomerId = new PropertyExpression(prefix + "CustomerId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._OrderEmployeeId = new PropertyExpression(prefix + "OrderEmployeeId");
            this._Address = new PropertyExpression(prefix + "Address");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Phone = new PropertyExpression(prefix + "Phone");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._Amount = new PropertyExpression(prefix + "Amount");
            this._FavourableAmount = new PropertyExpression(prefix + "FavourableAmount");
            this._FavourableDescription = new PropertyExpression(prefix + "FavourableDescription");
            this._ActualAmount = new PropertyExpression(prefix + "ActualAmount");
            this._DeliveryTypeId = new PropertyExpression(prefix + "DeliveryTypeId");
            this._DeliveryStatusId = new PropertyExpression(prefix + "DeliveryStatusId");
            this._PlanDeliveryTime = new PropertyExpression(prefix + "PlanDeliveryTime");
            this._DeliveryTime = new PropertyExpression(prefix + "DeliveryTime");
            this._DeliveryRemark = new PropertyExpression(prefix + "DeliveryRemark");
            this._SettleedAmount = new PropertyExpression(prefix + "SettleedAmount");
            this._UnSettleedAmount = new PropertyExpression(prefix + "UnSettleedAmount");
            this._SettleStatusId = new PropertyExpression(prefix + "SettleStatusId");
            this._IsDraft = new PropertyExpression(prefix + "IsDraft");
            this._IsCompleted = new PropertyExpression(prefix + "IsCompleted");
            this._IsDeliveryBalance = new PropertyExpression(prefix + "IsDeliveryBalance");
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            ALL = new PropertyExpression[] {this._SalesOrderId,this._SalesOrderNo,this._SalesOrderTypeId,this._CompanyId,this._CustomerId,this._CreateTime,this._OrderEmployeeId,this._Address,this._ContactName,this._Phone,this._IsMapped,this._X,this._Y,this._Remark,this._Amount,this._FavourableAmount,this._FavourableDescription,this._ActualAmount,this._DeliveryTypeId,this._DeliveryStatusId,this._PlanDeliveryTime,this._DeliveryTime,this._DeliveryRemark,this._SettleedAmount,this._UnSettleedAmount,this._SettleStatusId,this._IsDraft,this._IsCompleted,this._IsDeliveryBalance,this._StoreId};
        }
         

        private PropertyExpression _SalesOrderId;
        /// <summary>
        /// SalesOrderId,
        /// </summary>
        public PropertyExpression SalesOrderId { get{return _SalesOrderId;}}
        private PropertyExpression _SalesOrderNo;
        /// <summary>
        /// 订单号,
        /// </summary>
        public PropertyExpression SalesOrderNo { get{return _SalesOrderNo;}}
        private PropertyExpression _SalesOrderTypeId;
        /// <summary>
        /// 订单类别,
        /// </summary>
        public PropertyExpression SalesOrderTypeId { get{return _SalesOrderTypeId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _CustomerId;
        /// <summary>
        /// 客户,
        /// </summary>
        public PropertyExpression CustomerId { get{return _CustomerId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _OrderEmployeeId;
        /// <summary>
        /// 业务员,
        /// </summary>
        public PropertyExpression OrderEmployeeId { get{return _OrderEmployeeId;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 收货地址,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Phone;
        /// <summary>
        /// 联系电话,
        /// </summary>
        public PropertyExpression Phone { get{return _Phone;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已在地图上标记,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _Amount;
        /// <summary>
        /// 优惠前金额,
        /// </summary>
        public PropertyExpression Amount { get{return _Amount;}}
        private PropertyExpression _FavourableAmount;
        /// <summary>
        /// 优惠金额,
        /// </summary>
        public PropertyExpression FavourableAmount { get{return _FavourableAmount;}}
        private PropertyExpression _FavourableDescription;
        /// <summary>
        /// 优惠描述,
        /// </summary>
        public PropertyExpression FavourableDescription { get{return _FavourableDescription;}}
        private PropertyExpression _ActualAmount;
        /// <summary>
        /// 实际订单金额,
        /// </summary>
        public PropertyExpression ActualAmount { get{return _ActualAmount;}}
        private PropertyExpression _DeliveryTypeId;
        /// <summary>
        /// 交货类型,
        /// </summary>
        public PropertyExpression DeliveryTypeId { get{return _DeliveryTypeId;}}
        private PropertyExpression _DeliveryStatusId;
        /// <summary>
        /// 交货状态,
        /// </summary>
        public PropertyExpression DeliveryStatusId { get{return _DeliveryStatusId;}}
        private PropertyExpression _PlanDeliveryTime;
        /// <summary>
        /// 配送时间,
        /// </summary>
        public PropertyExpression PlanDeliveryTime { get{return _PlanDeliveryTime;}}
        private PropertyExpression _DeliveryTime;
        /// <summary>
        /// 实际交货时间,
        /// </summary>
        public PropertyExpression DeliveryTime { get{return _DeliveryTime;}}
        private PropertyExpression _DeliveryRemark;
        /// <summary>
        /// 物流备注,
        /// </summary>
        public PropertyExpression DeliveryRemark { get{return _DeliveryRemark;}}
        private PropertyExpression _SettleedAmount;
        /// <summary>
        /// 已结算金额,
        /// </summary>
        public PropertyExpression SettleedAmount { get{return _SettleedAmount;}}
        private PropertyExpression _UnSettleedAmount;
        /// <summary>
        /// 未结算金额,
        /// </summary>
        public PropertyExpression UnSettleedAmount { get{return _UnSettleedAmount;}}
        private PropertyExpression _SettleStatusId;
        /// <summary>
        /// 结算状态,
        /// </summary>
        public PropertyExpression SettleStatusId { get{return _SettleStatusId;}}
        private PropertyExpression _IsDraft;
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public PropertyExpression IsDraft { get{return _IsDraft;}}
        private PropertyExpression _IsCompleted;
        /// <summary>
        /// 是否结束,
        /// </summary>
        public PropertyExpression IsCompleted { get{return _IsCompleted;}}
        private PropertyExpression _IsDeliveryBalance;
        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        public PropertyExpression IsDeliveryBalance { get{return _IsDeliveryBalance;}}
        private PropertyExpression _StoreId;
        /// <summary>
        /// 仓库,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}



        private EmployeeDescriptor _OrderEmployee;
        public EmployeeDescriptor OrderEmployee 
        { 
            get
            {
                if(_OrderEmployee==null) _OrderEmployee=new EmployeeDescriptor(base.Prefix+"OrderEmployee.");
                return _OrderEmployee;
            }
        }
        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private CustomerDescriptor _Customer;
        public CustomerDescriptor Customer 
        { 
            get
            {
                if(_Customer==null) _Customer=new CustomerDescriptor(base.Prefix+"Customer.");
                return _Customer;
            }
        }
        private StoreDescriptor _Store;
        public StoreDescriptor Store 
        { 
            get
            {
                if(_Store==null) _Store=new StoreDescriptor(base.Prefix+"Store.");
                return _Store;
            }
        }
    }
     #endregion


    #region SalesOrders
    /// <summary>
    /// SalesOrder,销售订单
    /// </summary>
    [Table]
    public partial class SalesOrders:EntityList<SalesOrder> 
    {
        
    }
    #endregion


    #region SalesOrderLine
    /// <summary>
    /// SalesOrderLine,
    /// </summary>
    [Table]
    public partial class SalesOrderLine 
    {
        
        public SalesOrderLine()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// SalesOrderLineId,
        /// </summary>
        [DisplayName("SalesOrderLineId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="SalesOrderLineId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long SalesOrderLineId {  get; set; }


        /// <summary>
        /// SalesOrderId,
        /// </summary>
        [DisplayName("SalesOrderId")]
        [Column()]
 
        public long? SalesOrderId {  get; set; }


        /// <summary>
        /// 数量,
        /// </summary>
        [DisplayName("数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="数量不允许空")]
 
        public decimal Quantity {  get; set; }


        /// <summary>
        /// 商品,
        /// </summary>
        [DisplayName("商品")]
        [Column()]
[Required(ErrorMessage="商品不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 商品名称,
        /// </summary>
        [DisplayName("商品名称")]
        [Column(Size = 100)]
[Required(ErrorMessage="商品名称不允许空")]
[MaxLength(100,ErrorMessage="商品名称不能超过100个字")]
 
        public string ProductName {  get; set; }


        /// <summary>
        /// 单位,
        /// </summary>
        [DisplayName("单位")]
        [Column(Size = 10)]
[Required(ErrorMessage="单位不允许空")]
[MaxLength(10,ErrorMessage="单位不能超过10个字")]
 
        public string Unit {  get; set; }


        /// <summary>
        /// 单价,
        /// </summary>
        [DisplayName("单价")]
        [Column(Size = 20)]
[Required(ErrorMessage="单价不允许空")]
 
        public decimal Price {  get; set; }


        /// <summary>
        /// 金额,
        /// </summary>
        [DisplayName("金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="金额不允许空")]
 
        public decimal Amount {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 商品编号,
        /// </summary>
        [DisplayName("商品编号")]
        [Column(Size = 30)]
[Required(ErrorMessage="商品编号不允许空")]
[MaxLength(30,ErrorMessage="商品编号不能超过30个字")]
 
        public string ProductNo {  get; set; }


        /// <summary>
        /// 客户商品编号,
        /// </summary>
        [DisplayName("客户商品编号")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="客户商品编号不能超过30个字")]
 
        public string CustomerProductNo {  get; set; }


        /// <summary>
        /// 条形码,
        /// </summary>
        [DisplayName("条形码")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="条形码不能超过30个字")]
 
        public string Barcode {  get; set; }


        /// <summary>
        /// 规格,
        /// </summary>
        [DisplayName("规格")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="规格不能超过30个字")]
 
        public string Spec {  get; set; }


        /// <summary>
        /// 批号,
        /// </summary>
        [DisplayName("批号")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="批号不能超过50个字")]
 
        public string LotNo {  get; set; }


        /// <summary>
        /// 实收数量,
        /// </summary>
        [DisplayName("实收数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="实收数量不允许空")]
 
        public decimal ActualQuantity {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// SalesOrderLine.SalesOrder,
        /// </summary>
        [Relation("this.SalesOrderId=out.SalesOrderId")]
        public SalesOrder SalesOrder { get;  set;  } 



        /// <summary>
        /// SalesOrderLine.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        #endregion
    }
    #endregion
    #region SalesOrderLineProperties
    public static partial class SalesOrderLine_
    {
    
        private static SalesOrderLineDescriptor instance = new SalesOrderLineDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// SalesOrderLineId,
        /// </summary>
        public static PropertyExpression SalesOrderLineId { get{return instance.SalesOrderLineId;}} 
        /// <summary>
        /// SalesOrderId,
        /// </summary>
        public static PropertyExpression SalesOrderId { get{return instance.SalesOrderId;}} 
        /// <summary>
        /// 数量,
        /// </summary>
        public static PropertyExpression Quantity { get{return instance.Quantity;}} 
        /// <summary>
        /// 商品,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 商品名称,
        /// </summary>
        public static PropertyExpression ProductName { get{return instance.ProductName;}} 
        /// <summary>
        /// 单位,
        /// </summary>
        public static PropertyExpression Unit { get{return instance.Unit;}} 
        /// <summary>
        /// 单价,
        /// </summary>
        public static PropertyExpression Price { get{return instance.Price;}} 
        /// <summary>
        /// 金额,
        /// </summary>
        public static PropertyExpression Amount { get{return instance.Amount;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 商品编号,
        /// </summary>
        public static PropertyExpression ProductNo { get{return instance.ProductNo;}} 
        /// <summary>
        /// 客户商品编号,
        /// </summary>
        public static PropertyExpression CustomerProductNo { get{return instance.CustomerProductNo;}} 
        /// <summary>
        /// 条形码,
        /// </summary>
        public static PropertyExpression Barcode { get{return instance.Barcode;}} 
        /// <summary>
        /// 规格,
        /// </summary>
        public static PropertyExpression Spec { get{return instance.Spec;}} 
        /// <summary>
        /// 批号,
        /// </summary>
        public static PropertyExpression LotNo { get{return instance.LotNo;}} 
        /// <summary>
        /// 实收数量,
        /// </summary>
        public static PropertyExpression ActualQuantity { get{return instance.ActualQuantity;}}


 
        /// <summary>
        /// SalesOrderLine.SalesOrder,
        /// </summary>
        public static SalesOrderDescriptor SalesOrder { get{return instance.SalesOrder;}} 
        /// <summary>
        /// SalesOrderLine.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region SalesOrderLineDescriptor
    public partial class SalesOrderLineDescriptor:ObjectDescriptorBase
    {
     
        public SalesOrderLineDescriptor(string prefix):base(prefix)
        {  
    
            this._SalesOrderLineId = new PropertyExpression(prefix + "SalesOrderLineId");
            this._SalesOrderId = new PropertyExpression(prefix + "SalesOrderId");
            this._Quantity = new PropertyExpression(prefix + "Quantity");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._ProductName = new PropertyExpression(prefix + "ProductName");
            this._Unit = new PropertyExpression(prefix + "Unit");
            this._Price = new PropertyExpression(prefix + "Price");
            this._Amount = new PropertyExpression(prefix + "Amount");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._ProductNo = new PropertyExpression(prefix + "ProductNo");
            this._CustomerProductNo = new PropertyExpression(prefix + "CustomerProductNo");
            this._Barcode = new PropertyExpression(prefix + "Barcode");
            this._Spec = new PropertyExpression(prefix + "Spec");
            this._LotNo = new PropertyExpression(prefix + "LotNo");
            this._ActualQuantity = new PropertyExpression(prefix + "ActualQuantity");
            ALL = new PropertyExpression[] {this._SalesOrderLineId,this._SalesOrderId,this._Quantity,this._ProductId,this._ProductName,this._Unit,this._Price,this._Amount,this._Remark,this._ProductNo,this._CustomerProductNo,this._Barcode,this._Spec,this._LotNo,this._ActualQuantity};
        }
         

        private PropertyExpression _SalesOrderLineId;
        /// <summary>
        /// SalesOrderLineId,
        /// </summary>
        public PropertyExpression SalesOrderLineId { get{return _SalesOrderLineId;}}
        private PropertyExpression _SalesOrderId;
        /// <summary>
        /// SalesOrderId,
        /// </summary>
        public PropertyExpression SalesOrderId { get{return _SalesOrderId;}}
        private PropertyExpression _Quantity;
        /// <summary>
        /// 数量,
        /// </summary>
        public PropertyExpression Quantity { get{return _Quantity;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// 商品,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _ProductName;
        /// <summary>
        /// 商品名称,
        /// </summary>
        public PropertyExpression ProductName { get{return _ProductName;}}
        private PropertyExpression _Unit;
        /// <summary>
        /// 单位,
        /// </summary>
        public PropertyExpression Unit { get{return _Unit;}}
        private PropertyExpression _Price;
        /// <summary>
        /// 单价,
        /// </summary>
        public PropertyExpression Price { get{return _Price;}}
        private PropertyExpression _Amount;
        /// <summary>
        /// 金额,
        /// </summary>
        public PropertyExpression Amount { get{return _Amount;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _ProductNo;
        /// <summary>
        /// 商品编号,
        /// </summary>
        public PropertyExpression ProductNo { get{return _ProductNo;}}
        private PropertyExpression _CustomerProductNo;
        /// <summary>
        /// 客户商品编号,
        /// </summary>
        public PropertyExpression CustomerProductNo { get{return _CustomerProductNo;}}
        private PropertyExpression _Barcode;
        /// <summary>
        /// 条形码,
        /// </summary>
        public PropertyExpression Barcode { get{return _Barcode;}}
        private PropertyExpression _Spec;
        /// <summary>
        /// 规格,
        /// </summary>
        public PropertyExpression Spec { get{return _Spec;}}
        private PropertyExpression _LotNo;
        /// <summary>
        /// 批号,
        /// </summary>
        public PropertyExpression LotNo { get{return _LotNo;}}
        private PropertyExpression _ActualQuantity;
        /// <summary>
        /// 实收数量,
        /// </summary>
        public PropertyExpression ActualQuantity { get{return _ActualQuantity;}}



        private SalesOrderDescriptor _SalesOrder;
        public SalesOrderDescriptor SalesOrder 
        { 
            get
            {
                if(_SalesOrder==null) _SalesOrder=new SalesOrderDescriptor(base.Prefix+"SalesOrder.");
                return _SalesOrder;
            }
        }
        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
    }
     #endregion


    #region SalesOrderLines
    /// <summary>
    /// SalesOrderLine,
    /// </summary>
    [Table]
    public partial class SalesOrderLines:EntityList<SalesOrderLine> 
    {
        
    }
    #endregion


    #region SalesOrderCapital
    /// <summary>
    /// SalesOrderCapital,客户资金流水
    /// </summary>
    [Table]
    public partial class SalesOrderCapital 
    {
        
        public SalesOrderCapital()
        {

            CapitalTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        [DisplayName("SalesOrderCapitalId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="SalesOrderCapitalId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long SalesOrderCapitalId {  get; set; }


        /// <summary>
        /// 金额,
        /// </summary>
        [DisplayName("金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="金额不允许空")]
 
        public decimal Amount {  get; set; }


        /// <summary>
        /// 收款时间,
        /// </summary>
        [DisplayName("收款时间")]
        [Column()]
[Required(ErrorMessage="收款时间不允许空")]
 
        public DateTime CapitalTime {  get; set; }


        /// <summary>
        /// 支付方式,
        /// </summary>
        [DisplayName("支付方式")]
        [Column()]
[Required(ErrorMessage="支付方式不允许空")]
 
        public long PaymentTypeId {  get; set; }


        /// <summary>
        /// 收款负责人,
        /// </summary>
        [DisplayName("收款负责人")]
        [Column()]
[Required(ErrorMessage="收款负责人不允许空")]
 
        public long CapitalEmployeeId {  get; set; }


        /// <summary>
        /// 关联订单,
        /// </summary>
        [DisplayName("关联订单")]
        [Column()]
[Required(ErrorMessage="关联订单不允许空")]
 
        public long SalesOrderId {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// SalesOrderCapital.CapitalEmployee,
        /// </summary>
        [Relation("this.CapitalEmployeeId=out.EmployeeId")]
        public Employee CapitalEmployee { get;  set;  } 



        /// <summary>
        /// SalesOrderCapital.PaymentType,
        /// </summary>
        [Relation("this.PaymentTypeId=out.PaymentTypeId")]
        public PaymentType PaymentType { get;  set;  } 



        /// <summary>
        /// SalesOrderCapital.SalesOrder,
        /// </summary>
        [Relation("this.SalesOrderId=out.SalesOrderId")]
        public SalesOrder SalesOrder { get;  set;  } 



        #endregion
    }
    #endregion
    #region SalesOrderCapitalProperties
    public static partial class SalesOrderCapital_
    {
    
        private static SalesOrderCapitalDescriptor instance = new SalesOrderCapitalDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        public static PropertyExpression SalesOrderCapitalId { get{return instance.SalesOrderCapitalId;}} 
        /// <summary>
        /// 金额,
        /// </summary>
        public static PropertyExpression Amount { get{return instance.Amount;}} 
        /// <summary>
        /// 收款时间,
        /// </summary>
        public static PropertyExpression CapitalTime { get{return instance.CapitalTime;}} 
        /// <summary>
        /// 支付方式,
        /// </summary>
        public static PropertyExpression PaymentTypeId { get{return instance.PaymentTypeId;}} 
        /// <summary>
        /// 收款负责人,
        /// </summary>
        public static PropertyExpression CapitalEmployeeId { get{return instance.CapitalEmployeeId;}} 
        /// <summary>
        /// 关联订单,
        /// </summary>
        public static PropertyExpression SalesOrderId { get{return instance.SalesOrderId;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}}


 
        /// <summary>
        /// SalesOrderCapital.CapitalEmployee,
        /// </summary>
        public static EmployeeDescriptor CapitalEmployee { get{return instance.CapitalEmployee;}} 
        /// <summary>
        /// SalesOrderCapital.PaymentType,
        /// </summary>
        public static PaymentTypeDescriptor PaymentType { get{return instance.PaymentType;}} 
        /// <summary>
        /// SalesOrderCapital.SalesOrder,
        /// </summary>
        public static SalesOrderDescriptor SalesOrder { get{return instance.SalesOrder;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region SalesOrderCapitalDescriptor
    public partial class SalesOrderCapitalDescriptor:ObjectDescriptorBase
    {
     
        public SalesOrderCapitalDescriptor(string prefix):base(prefix)
        {  
    
            this._SalesOrderCapitalId = new PropertyExpression(prefix + "SalesOrderCapitalId");
            this._Amount = new PropertyExpression(prefix + "Amount");
            this._CapitalTime = new PropertyExpression(prefix + "CapitalTime");
            this._PaymentTypeId = new PropertyExpression(prefix + "PaymentTypeId");
            this._CapitalEmployeeId = new PropertyExpression(prefix + "CapitalEmployeeId");
            this._SalesOrderId = new PropertyExpression(prefix + "SalesOrderId");
            this._Remark = new PropertyExpression(prefix + "Remark");
            ALL = new PropertyExpression[] {this._SalesOrderCapitalId,this._Amount,this._CapitalTime,this._PaymentTypeId,this._CapitalEmployeeId,this._SalesOrderId,this._Remark};
        }
         

        private PropertyExpression _SalesOrderCapitalId;
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        public PropertyExpression SalesOrderCapitalId { get{return _SalesOrderCapitalId;}}
        private PropertyExpression _Amount;
        /// <summary>
        /// 金额,
        /// </summary>
        public PropertyExpression Amount { get{return _Amount;}}
        private PropertyExpression _CapitalTime;
        /// <summary>
        /// 收款时间,
        /// </summary>
        public PropertyExpression CapitalTime { get{return _CapitalTime;}}
        private PropertyExpression _PaymentTypeId;
        /// <summary>
        /// 支付方式,
        /// </summary>
        public PropertyExpression PaymentTypeId { get{return _PaymentTypeId;}}
        private PropertyExpression _CapitalEmployeeId;
        /// <summary>
        /// 收款负责人,
        /// </summary>
        public PropertyExpression CapitalEmployeeId { get{return _CapitalEmployeeId;}}
        private PropertyExpression _SalesOrderId;
        /// <summary>
        /// 关联订单,
        /// </summary>
        public PropertyExpression SalesOrderId { get{return _SalesOrderId;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}



        private EmployeeDescriptor _CapitalEmployee;
        public EmployeeDescriptor CapitalEmployee 
        { 
            get
            {
                if(_CapitalEmployee==null) _CapitalEmployee=new EmployeeDescriptor(base.Prefix+"CapitalEmployee.");
                return _CapitalEmployee;
            }
        }
        private PaymentTypeDescriptor _PaymentType;
        public PaymentTypeDescriptor PaymentType 
        { 
            get
            {
                if(_PaymentType==null) _PaymentType=new PaymentTypeDescriptor(base.Prefix+"PaymentType.");
                return _PaymentType;
            }
        }
        private SalesOrderDescriptor _SalesOrder;
        public SalesOrderDescriptor SalesOrder 
        { 
            get
            {
                if(_SalesOrder==null) _SalesOrder=new SalesOrderDescriptor(base.Prefix+"SalesOrder.");
                return _SalesOrder;
            }
        }
    }
     #endregion


    #region SalesOrderCapitals
    /// <summary>
    /// SalesOrderCapital,客户资金流水
    /// </summary>
    [Table]
    public partial class SalesOrderCapitals:EntityList<SalesOrderCapital> 
    {
        
    }
    #endregion


    #region Provider
    /// <summary>
    /// Provider,供货商
    /// </summary>
    [Table]
    public partial class Provider 
    {
        
        public Provider()
        {

            CreateTime=DateTime.Now;
            UpdateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// Id主键,
        /// </summary>
        [DisplayName("Id主键")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="Id主键不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long ProviderId {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 地区,
        /// </summary>
        [DisplayName("地区")]
        [Column()]
 
        public long? AreaId {  get; set; }


        /// <summary>
        /// 客户编号,
        /// </summary>
        [DisplayName("客户编号")]
        [Column(Size = 20)]
[Required(ErrorMessage="客户编号不允许空")]
[MaxLength(20,ErrorMessage="客户编号不能超过20个字")]
 
        public string CompanyNo {  get; set; }


        /// <summary>
        /// 公司简称,
        /// </summary>
        [DisplayName("公司简称")]
        [Column(Size = 20)]
[Required(ErrorMessage="公司简称不允许空")]
[MaxLength(20,ErrorMessage="公司简称不能超过20个字")]
 
        public string CompanyName {  get; set; }


        /// <summary>
        /// 公司全称,
        /// </summary>
        [DisplayName("公司全称")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="公司全称不能超过50个字")]
 
        public string FullName {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[Required(ErrorMessage="联系人不允许空")]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 20)]
[Required(ErrorMessage="手机不允许空")]
[MaxLength(20,ErrorMessage="手机不能超过20个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 电子邮件,
        /// </summary>
        [DisplayName("电子邮件")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="电子邮件不能超过100个字")]
 
        public string Email {  get; set; }


        /// <summary>
        /// 地址,
        /// </summary>
        [DisplayName("地址")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="地址不能超过200个字")]
 
        public string Address {  get; set; }


        /// <summary>
        /// 链接平台公司Id,0表示未链接,
        /// </summary>
        [DisplayName("链接平台公司Id,0表示未链接")]
        [Column()]
[Required(ErrorMessage="链接平台公司Id,0表示未链接不允许空")]
 
        public long GlobalCompanyId {  get; set; }


        /// <summary>
        /// 负责人,0表示无负责人,
        /// </summary>
        [DisplayName("负责人,0表示无负责人")]
        [Column()]
[Required(ErrorMessage="负责人,0表示无负责人不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 是否可用,
        /// </summary>
        [DisplayName("是否可用")]
        [Column()]
[Required(ErrorMessage="是否可用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 2000)]
[MaxLength(2000,ErrorMessage="备注不能超过2000个字")]
 
        public string Description {  get; set; }


        /// <summary>
        /// 应付款,
        /// </summary>
        [DisplayName("应付款")]
        [Column(Size = 20)]
 
        public decimal? AccountPayables {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 是否链接,
        /// </summary>
        [DisplayName("是否链接")]
        [Column()]
[Required(ErrorMessage="是否链接不允许空")]
 
        public bool IsLink {  get; set; }


        /// <summary>
        /// 企业代码,
        /// </summary>
        [DisplayName("企业代码")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="企业代码不能超过10个字")]
 
        public string CompanyCode {  get; set; }


        /// <summary>
        /// 最近订货时间,
        /// </summary>
        [DisplayName("最近订货时间")]
        [Column()]
 
        public DateTime? LatestOrderTime {  get; set; }


        /// <summary>
        /// 未完成订单数,
        /// </summary>
        [DisplayName("未完成订单数")]
        [Column()]
[Required(ErrorMessage="未完成订单数不允许空")]
 
        public long NotCompletedOrderCount {  get; set; }


        /// <summary>
        /// 修改时间,
        /// </summary>
        [DisplayName("修改时间")]
        [Column()]
[Required(ErrorMessage="修改时间不允许空")]
 
        public DateTime UpdateTime {  get; set; }


        /// <summary>
        /// 财务备注,
        /// </summary>
        [DisplayName("财务备注")]
        [Column(Size = 1000)]
[MaxLength(1000,ErrorMessage="财务备注不能超过1000个字")]
 
        public string FinanceRemark {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Provider.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        /// <summary>
        /// Provider.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        #endregion
    }
    #endregion
    #region ProviderProperties
    public static partial class Provider_
    {
    
        private static ProviderDescriptor instance = new ProviderDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// Id主键,
        /// </summary>
        public static PropertyExpression ProviderId { get{return instance.ProviderId;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 地区,
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 客户编号,
        /// </summary>
        public static PropertyExpression CompanyNo { get{return instance.CompanyNo;}} 
        /// <summary>
        /// 公司简称,
        /// </summary>
        public static PropertyExpression CompanyName { get{return instance.CompanyName;}} 
        /// <summary>
        /// 公司全称,
        /// </summary>
        public static PropertyExpression FullName { get{return instance.FullName;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public static PropertyExpression Email { get{return instance.Email;}} 
        /// <summary>
        /// 地址,
        /// </summary>
        public static PropertyExpression Address { get{return instance.Address;}} 
        /// <summary>
        /// 链接平台公司Id,0表示未链接,
        /// </summary>
        public static PropertyExpression GlobalCompanyId { get{return instance.GlobalCompanyId;}} 
        /// <summary>
        /// 负责人,0表示无负责人,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 是否可用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Description { get{return instance.Description;}} 
        /// <summary>
        /// 应付款,
        /// </summary>
        public static PropertyExpression AccountPayables { get{return instance.AccountPayables;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 是否链接,
        /// </summary>
        public static PropertyExpression IsLink { get{return instance.IsLink;}} 
        /// <summary>
        /// 企业代码,
        /// </summary>
        public static PropertyExpression CompanyCode { get{return instance.CompanyCode;}} 
        /// <summary>
        /// 最近订货时间,
        /// </summary>
        public static PropertyExpression LatestOrderTime { get{return instance.LatestOrderTime;}} 
        /// <summary>
        /// 未完成订单数,
        /// </summary>
        public static PropertyExpression NotCompletedOrderCount { get{return instance.NotCompletedOrderCount;}} 
        /// <summary>
        /// 修改时间,
        /// </summary>
        public static PropertyExpression UpdateTime { get{return instance.UpdateTime;}} 
        /// <summary>
        /// 财务备注,
        /// </summary>
        public static PropertyExpression FinanceRemark { get{return instance.FinanceRemark;}}


 
        /// <summary>
        /// Provider.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}} 
        /// <summary>
        /// Provider.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ProviderDescriptor
    public partial class ProviderDescriptor:ObjectDescriptorBase
    {
     
        public ProviderDescriptor(string prefix):base(prefix)
        {  
    
            this._ProviderId = new PropertyExpression(prefix + "ProviderId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._CompanyNo = new PropertyExpression(prefix + "CompanyNo");
            this._CompanyName = new PropertyExpression(prefix + "CompanyName");
            this._FullName = new PropertyExpression(prefix + "FullName");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._Email = new PropertyExpression(prefix + "Email");
            this._Address = new PropertyExpression(prefix + "Address");
            this._GlobalCompanyId = new PropertyExpression(prefix + "GlobalCompanyId");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._Description = new PropertyExpression(prefix + "Description");
            this._AccountPayables = new PropertyExpression(prefix + "AccountPayables");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._IsLink = new PropertyExpression(prefix + "IsLink");
            this._CompanyCode = new PropertyExpression(prefix + "CompanyCode");
            this._LatestOrderTime = new PropertyExpression(prefix + "LatestOrderTime");
            this._NotCompletedOrderCount = new PropertyExpression(prefix + "NotCompletedOrderCount");
            this._UpdateTime = new PropertyExpression(prefix + "UpdateTime");
            this._FinanceRemark = new PropertyExpression(prefix + "FinanceRemark");
            ALL = new PropertyExpression[] {this._ProviderId,this._CompanyId,this._AreaId,this._CompanyNo,this._CompanyName,this._FullName,this._ContactName,this._Mb,this._Email,this._Address,this._GlobalCompanyId,this._EmployeeId,this._IsActive,this._Description,this._AccountPayables,this._CreateTime,this._IsLink,this._CompanyCode,this._LatestOrderTime,this._NotCompletedOrderCount,this._UpdateTime,this._FinanceRemark};
        }
         

        private PropertyExpression _ProviderId;
        /// <summary>
        /// Id主键,
        /// </summary>
        public PropertyExpression ProviderId { get{return _ProviderId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _AreaId;
        /// <summary>
        /// 地区,
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _CompanyNo;
        /// <summary>
        /// 客户编号,
        /// </summary>
        public PropertyExpression CompanyNo { get{return _CompanyNo;}}
        private PropertyExpression _CompanyName;
        /// <summary>
        /// 公司简称,
        /// </summary>
        public PropertyExpression CompanyName { get{return _CompanyName;}}
        private PropertyExpression _FullName;
        /// <summary>
        /// 公司全称,
        /// </summary>
        public PropertyExpression FullName { get{return _FullName;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _Email;
        /// <summary>
        /// 电子邮件,
        /// </summary>
        public PropertyExpression Email { get{return _Email;}}
        private PropertyExpression _Address;
        /// <summary>
        /// 地址,
        /// </summary>
        public PropertyExpression Address { get{return _Address;}}
        private PropertyExpression _GlobalCompanyId;
        /// <summary>
        /// 链接平台公司Id,0表示未链接,
        /// </summary>
        public PropertyExpression GlobalCompanyId { get{return _GlobalCompanyId;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 负责人,0表示无负责人,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否可用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _Description;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Description { get{return _Description;}}
        private PropertyExpression _AccountPayables;
        /// <summary>
        /// 应付款,
        /// </summary>
        public PropertyExpression AccountPayables { get{return _AccountPayables;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _IsLink;
        /// <summary>
        /// 是否链接,
        /// </summary>
        public PropertyExpression IsLink { get{return _IsLink;}}
        private PropertyExpression _CompanyCode;
        /// <summary>
        /// 企业代码,
        /// </summary>
        public PropertyExpression CompanyCode { get{return _CompanyCode;}}
        private PropertyExpression _LatestOrderTime;
        /// <summary>
        /// 最近订货时间,
        /// </summary>
        public PropertyExpression LatestOrderTime { get{return _LatestOrderTime;}}
        private PropertyExpression _NotCompletedOrderCount;
        /// <summary>
        /// 未完成订单数,
        /// </summary>
        public PropertyExpression NotCompletedOrderCount { get{return _NotCompletedOrderCount;}}
        private PropertyExpression _UpdateTime;
        /// <summary>
        /// 修改时间,
        /// </summary>
        public PropertyExpression UpdateTime { get{return _UpdateTime;}}
        private PropertyExpression _FinanceRemark;
        /// <summary>
        /// 财务备注,
        /// </summary>
        public PropertyExpression FinanceRemark { get{return _FinanceRemark;}}



        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
    }
     #endregion


    #region Providers
    /// <summary>
    /// Provider,供货商
    /// </summary>
    [Table]
    public partial class Providers:EntityList<Provider> 
    {
        
    }
    #endregion


    #region PurchaseOrder
    /// <summary>
    /// PurchaseOrder,
    /// </summary>
    [Table]
    public partial class PurchaseOrder 
    {
        
        public PurchaseOrder()
        {

            CreateTime=DateTime.Now;
            DeliveryTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        [DisplayName("PurchaseOrderId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="PurchaseOrderId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long PurchaseOrderId {  get; set; }


        /// <summary>
        /// 采购单号,
        /// </summary>
        [DisplayName("采购单号")]
        [Column(Size = 30)]
[Required(ErrorMessage="采购单号不允许空")]
[MaxLength(30,ErrorMessage="采购单号不能超过30个字")]
 
        public string PurchaseOrderNo {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 供货商,
        /// </summary>
        [DisplayName("供货商")]
        [Column()]
[Required(ErrorMessage="供货商不允许空")]
 
        public long ProviderId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 创建人,
        /// </summary>
        [DisplayName("创建人")]
        [Column()]
[Required(ErrorMessage="创建人不允许空")]
 
        public long OrderEmployeeId {  get; set; }


        /// <summary>
        /// 联系人,
        /// </summary>
        [DisplayName("联系人")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系人不能超过20个字")]
 
        public string ContactName {  get; set; }


        /// <summary>
        /// 联系电话,
        /// </summary>
        [DisplayName("联系电话")]
        [Column(Size = 20)]
[MaxLength(20,ErrorMessage="联系电话不能超过20个字")]
 
        public string Phone {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 实际订单金额,
        /// </summary>
        [DisplayName("实际订单金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="实际订单金额不允许空")]
 
        public decimal ActualAmount {  get; set; }


        /// <summary>
        /// 交货状态,
        /// </summary>
        [DisplayName("交货状态")]
        [Column()]
[Required(ErrorMessage="交货状态不允许空")]
 
        public DeliveryStatus DeliveryStatusId {  get; set; }


        /// <summary>
        /// 实际交货时间,
        /// </summary>
        [DisplayName("实际交货时间")]
        [Column()]
[Required(ErrorMessage="实际交货时间不允许空")]
 
        public DateTime DeliveryTime {  get; set; }


        /// <summary>
        /// 物流备注,
        /// </summary>
        [DisplayName("物流备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="物流备注不能超过200个字")]
 
        public string DeliveryRemark {  get; set; }


        /// <summary>
        /// 已结算金额,
        /// </summary>
        [DisplayName("已结算金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="已结算金额不允许空")]
 
        public decimal SettleedAmount {  get; set; }


        /// <summary>
        /// 未结算金额,
        /// </summary>
        [DisplayName("未结算金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="未结算金额不允许空")]
 
        public decimal UnSettleedAmount {  get; set; }


        /// <summary>
        /// 结算状态,
        /// </summary>
        [DisplayName("结算状态")]
        [Column()]
[Required(ErrorMessage="结算状态不允许空")]
 
        public SettleStatus SettleStatusId {  get; set; }


        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        [DisplayName("是否草稿订单")]
        [Column()]
[Required(ErrorMessage="是否草稿订单不允许空")]
 
        public bool IsDraft {  get; set; }


        /// <summary>
        /// 是否结束,
        /// </summary>
        [DisplayName("是否结束")]
        [Column()]
[Required(ErrorMessage="是否结束不允许空")]
 
        public bool IsCompleted {  get; set; }


        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        [DisplayName("是否实收数平衡")]
        [Column()]
[Required(ErrorMessage="是否实收数平衡不允许空")]
 
        public bool IsDeliveryBalance {  get; set; }


        /// <summary>
        /// 仓库,
        /// </summary>
        [DisplayName("仓库")]
        [Column()]
[Required(ErrorMessage="仓库不允许空")]
 
        public long StoreId {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// PurchaseOrder.Provider,
        /// </summary>
        [Relation("this.ProviderId=out.ProviderId")]
        public Provider Provider { get;  set;  } 



        /// <summary>
        /// PurchaseOrder.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// PurchaseOrder.OrderEmployee,
        /// </summary>
        [Relation("this.OrderEmployeeId=out.EmployeeId")]
        public Employee OrderEmployee { get;  set;  } 



        /// <summary>
        /// PurchaseOrder.Store,
        /// </summary>
        [Relation("this.StoreId=out.StoreId")]
        public Store Store { get;  set;  } 



        #endregion
    }
    #endregion
    #region PurchaseOrderProperties
    public static partial class PurchaseOrder_
    {
    
        private static PurchaseOrderDescriptor instance = new PurchaseOrderDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        public static PropertyExpression PurchaseOrderId { get{return instance.PurchaseOrderId;}} 
        /// <summary>
        /// 采购单号,
        /// </summary>
        public static PropertyExpression PurchaseOrderNo { get{return instance.PurchaseOrderNo;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 供货商,
        /// </summary>
        public static PropertyExpression ProviderId { get{return instance.ProviderId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 创建人,
        /// </summary>
        public static PropertyExpression OrderEmployeeId { get{return instance.OrderEmployeeId;}} 
        /// <summary>
        /// 联系人,
        /// </summary>
        public static PropertyExpression ContactName { get{return instance.ContactName;}} 
        /// <summary>
        /// 联系电话,
        /// </summary>
        public static PropertyExpression Phone { get{return instance.Phone;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 实际订单金额,
        /// </summary>
        public static PropertyExpression ActualAmount { get{return instance.ActualAmount;}} 
        /// <summary>
        /// 交货状态,
        /// </summary>
        public static PropertyExpression DeliveryStatusId { get{return instance.DeliveryStatusId;}} 
        /// <summary>
        /// 实际交货时间,
        /// </summary>
        public static PropertyExpression DeliveryTime { get{return instance.DeliveryTime;}} 
        /// <summary>
        /// 物流备注,
        /// </summary>
        public static PropertyExpression DeliveryRemark { get{return instance.DeliveryRemark;}} 
        /// <summary>
        /// 已结算金额,
        /// </summary>
        public static PropertyExpression SettleedAmount { get{return instance.SettleedAmount;}} 
        /// <summary>
        /// 未结算金额,
        /// </summary>
        public static PropertyExpression UnSettleedAmount { get{return instance.UnSettleedAmount;}} 
        /// <summary>
        /// 结算状态,
        /// </summary>
        public static PropertyExpression SettleStatusId { get{return instance.SettleStatusId;}} 
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public static PropertyExpression IsDraft { get{return instance.IsDraft;}} 
        /// <summary>
        /// 是否结束,
        /// </summary>
        public static PropertyExpression IsCompleted { get{return instance.IsCompleted;}} 
        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        public static PropertyExpression IsDeliveryBalance { get{return instance.IsDeliveryBalance;}} 
        /// <summary>
        /// 仓库,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}}


 
        /// <summary>
        /// PurchaseOrder.Provider,
        /// </summary>
        public static ProviderDescriptor Provider { get{return instance.Provider;}} 
        /// <summary>
        /// PurchaseOrder.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// PurchaseOrder.OrderEmployee,
        /// </summary>
        public static EmployeeDescriptor OrderEmployee { get{return instance.OrderEmployee;}} 
        /// <summary>
        /// PurchaseOrder.Store,
        /// </summary>
        public static StoreDescriptor Store { get{return instance.Store;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PurchaseOrderDescriptor
    public partial class PurchaseOrderDescriptor:ObjectDescriptorBase
    {
     
        public PurchaseOrderDescriptor(string prefix):base(prefix)
        {  
    
            this._PurchaseOrderId = new PropertyExpression(prefix + "PurchaseOrderId");
            this._PurchaseOrderNo = new PropertyExpression(prefix + "PurchaseOrderNo");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._ProviderId = new PropertyExpression(prefix + "ProviderId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._OrderEmployeeId = new PropertyExpression(prefix + "OrderEmployeeId");
            this._ContactName = new PropertyExpression(prefix + "ContactName");
            this._Phone = new PropertyExpression(prefix + "Phone");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._ActualAmount = new PropertyExpression(prefix + "ActualAmount");
            this._DeliveryStatusId = new PropertyExpression(prefix + "DeliveryStatusId");
            this._DeliveryTime = new PropertyExpression(prefix + "DeliveryTime");
            this._DeliveryRemark = new PropertyExpression(prefix + "DeliveryRemark");
            this._SettleedAmount = new PropertyExpression(prefix + "SettleedAmount");
            this._UnSettleedAmount = new PropertyExpression(prefix + "UnSettleedAmount");
            this._SettleStatusId = new PropertyExpression(prefix + "SettleStatusId");
            this._IsDraft = new PropertyExpression(prefix + "IsDraft");
            this._IsCompleted = new PropertyExpression(prefix + "IsCompleted");
            this._IsDeliveryBalance = new PropertyExpression(prefix + "IsDeliveryBalance");
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            ALL = new PropertyExpression[] {this._PurchaseOrderId,this._PurchaseOrderNo,this._CompanyId,this._ProviderId,this._CreateTime,this._OrderEmployeeId,this._ContactName,this._Phone,this._Remark,this._ActualAmount,this._DeliveryStatusId,this._DeliveryTime,this._DeliveryRemark,this._SettleedAmount,this._UnSettleedAmount,this._SettleStatusId,this._IsDraft,this._IsCompleted,this._IsDeliveryBalance,this._StoreId};
        }
         

        private PropertyExpression _PurchaseOrderId;
        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        public PropertyExpression PurchaseOrderId { get{return _PurchaseOrderId;}}
        private PropertyExpression _PurchaseOrderNo;
        /// <summary>
        /// 采购单号,
        /// </summary>
        public PropertyExpression PurchaseOrderNo { get{return _PurchaseOrderNo;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _ProviderId;
        /// <summary>
        /// 供货商,
        /// </summary>
        public PropertyExpression ProviderId { get{return _ProviderId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _OrderEmployeeId;
        /// <summary>
        /// 创建人,
        /// </summary>
        public PropertyExpression OrderEmployeeId { get{return _OrderEmployeeId;}}
        private PropertyExpression _ContactName;
        /// <summary>
        /// 联系人,
        /// </summary>
        public PropertyExpression ContactName { get{return _ContactName;}}
        private PropertyExpression _Phone;
        /// <summary>
        /// 联系电话,
        /// </summary>
        public PropertyExpression Phone { get{return _Phone;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _ActualAmount;
        /// <summary>
        /// 实际订单金额,
        /// </summary>
        public PropertyExpression ActualAmount { get{return _ActualAmount;}}
        private PropertyExpression _DeliveryStatusId;
        /// <summary>
        /// 交货状态,
        /// </summary>
        public PropertyExpression DeliveryStatusId { get{return _DeliveryStatusId;}}
        private PropertyExpression _DeliveryTime;
        /// <summary>
        /// 实际交货时间,
        /// </summary>
        public PropertyExpression DeliveryTime { get{return _DeliveryTime;}}
        private PropertyExpression _DeliveryRemark;
        /// <summary>
        /// 物流备注,
        /// </summary>
        public PropertyExpression DeliveryRemark { get{return _DeliveryRemark;}}
        private PropertyExpression _SettleedAmount;
        /// <summary>
        /// 已结算金额,
        /// </summary>
        public PropertyExpression SettleedAmount { get{return _SettleedAmount;}}
        private PropertyExpression _UnSettleedAmount;
        /// <summary>
        /// 未结算金额,
        /// </summary>
        public PropertyExpression UnSettleedAmount { get{return _UnSettleedAmount;}}
        private PropertyExpression _SettleStatusId;
        /// <summary>
        /// 结算状态,
        /// </summary>
        public PropertyExpression SettleStatusId { get{return _SettleStatusId;}}
        private PropertyExpression _IsDraft;
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public PropertyExpression IsDraft { get{return _IsDraft;}}
        private PropertyExpression _IsCompleted;
        /// <summary>
        /// 是否结束,
        /// </summary>
        public PropertyExpression IsCompleted { get{return _IsCompleted;}}
        private PropertyExpression _IsDeliveryBalance;
        /// <summary>
        /// 是否实收数平衡,
        /// </summary>
        public PropertyExpression IsDeliveryBalance { get{return _IsDeliveryBalance;}}
        private PropertyExpression _StoreId;
        /// <summary>
        /// 仓库,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}



        private ProviderDescriptor _Provider;
        public ProviderDescriptor Provider 
        { 
            get
            {
                if(_Provider==null) _Provider=new ProviderDescriptor(base.Prefix+"Provider.");
                return _Provider;
            }
        }
        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private EmployeeDescriptor _OrderEmployee;
        public EmployeeDescriptor OrderEmployee 
        { 
            get
            {
                if(_OrderEmployee==null) _OrderEmployee=new EmployeeDescriptor(base.Prefix+"OrderEmployee.");
                return _OrderEmployee;
            }
        }
        private StoreDescriptor _Store;
        public StoreDescriptor Store 
        { 
            get
            {
                if(_Store==null) _Store=new StoreDescriptor(base.Prefix+"Store.");
                return _Store;
            }
        }
    }
     #endregion


    #region PurchaseOrders
    /// <summary>
    /// PurchaseOrder,
    /// </summary>
    [Table]
    public partial class PurchaseOrders:EntityList<PurchaseOrder> 
    {
        
    }
    #endregion


    #region PaymentType
    /// <summary>
    /// PaymentType,支付方式
    /// </summary>
    [Table]
    public partial class PaymentType 
    {
        
        public PaymentType()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// PaymentTypeId,
        /// </summary>
        [DisplayName("PaymentTypeId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="PaymentTypeId不允许空")]
 
        public long PaymentTypeId {  get; set; }


        /// <summary>
        /// PaymentTypeName,
        /// </summary>
        [DisplayName("PaymentTypeName")]
        [Column(Size = 30)]
[Required(ErrorMessage="PaymentTypeName不允许空")]
[MaxLength(30,ErrorMessage="PaymentTypeName不能超过30个字")]
 
        public string PaymentTypeName {  get; set; }


        #endregion

    }
    #endregion
    #region PaymentTypeProperties
    public static partial class PaymentType_
    {
    
        private static PaymentTypeDescriptor instance = new PaymentTypeDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// PaymentTypeId,
        /// </summary>
        public static PropertyExpression PaymentTypeId { get{return instance.PaymentTypeId;}} 
        /// <summary>
        /// PaymentTypeName,
        /// </summary>
        public static PropertyExpression PaymentTypeName { get{return instance.PaymentTypeName;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PaymentTypeDescriptor
    public partial class PaymentTypeDescriptor:ObjectDescriptorBase
    {
     
        public PaymentTypeDescriptor(string prefix):base(prefix)
        {  
    
            this._PaymentTypeId = new PropertyExpression(prefix + "PaymentTypeId");
            this._PaymentTypeName = new PropertyExpression(prefix + "PaymentTypeName");
            ALL = new PropertyExpression[] {this._PaymentTypeId,this._PaymentTypeName};
        }
         

        private PropertyExpression _PaymentTypeId;
        /// <summary>
        /// PaymentTypeId,
        /// </summary>
        public PropertyExpression PaymentTypeId { get{return _PaymentTypeId;}}
        private PropertyExpression _PaymentTypeName;
        /// <summary>
        /// PaymentTypeName,
        /// </summary>
        public PropertyExpression PaymentTypeName { get{return _PaymentTypeName;}}



    }
     #endregion


    #region PaymentTypes
    /// <summary>
    /// PaymentType,支付方式
    /// </summary>
    [Table]
    public partial class PaymentTypes:EntityList<PaymentType> 
    {
        
    }
    #endregion


    #region Permission
    /// <summary>
    /// Permission,权限
    /// </summary>
    [Table]
    public partial class Permission 
    {
        
        public Permission()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 权限代码,
        /// </summary>
        [DisplayName("权限代码")]
        [Column(IsPrimaryKey = true,Size = 30)]
[Required(ErrorMessage="权限代码不允许空")]
[MaxLength(30,ErrorMessage="权限代码不能超过30个字")]
 
        public string PermissionCode {  get; set; }


        /// <summary>
        /// 权限名称,
        /// </summary>
        [DisplayName("权限名称")]
        [Column(Size = 30)]
[Required(ErrorMessage="权限名称不允许空")]
[MaxLength(30,ErrorMessage="权限名称不能超过30个字")]
 
        public string PermissionName {  get; set; }


        /// <summary>
        /// 所属组,
        /// </summary>
        [DisplayName("所属组")]
        [Column(Size = 30)]
[Required(ErrorMessage="所属组不允许空")]
[MaxLength(30,ErrorMessage="所属组不能超过30个字")]
 
        public string PermissionGroupCode {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Permission.PermissionGroup,
        /// </summary>
        [Relation("this.PermissionGroupCode=out.PermissionGroupCode")]
        public PermissionGroup PermissionGroup { get;  set;  } 



        #endregion
    }
    #endregion
    #region PermissionProperties
    public static partial class Permission_
    {
    
        private static PermissionDescriptor instance = new PermissionDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 权限代码,
        /// </summary>
        public static PropertyExpression PermissionCode { get{return instance.PermissionCode;}} 
        /// <summary>
        /// 权限名称,
        /// </summary>
        public static PropertyExpression PermissionName { get{return instance.PermissionName;}} 
        /// <summary>
        /// 所属组,
        /// </summary>
        public static PropertyExpression PermissionGroupCode { get{return instance.PermissionGroupCode;}}


 
        /// <summary>
        /// Permission.PermissionGroup,
        /// </summary>
        public static PermissionGroupDescriptor PermissionGroup { get{return instance.PermissionGroup;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PermissionDescriptor
    public partial class PermissionDescriptor:ObjectDescriptorBase
    {
     
        public PermissionDescriptor(string prefix):base(prefix)
        {  
    
            this._PermissionCode = new PropertyExpression(prefix + "PermissionCode");
            this._PermissionName = new PropertyExpression(prefix + "PermissionName");
            this._PermissionGroupCode = new PropertyExpression(prefix + "PermissionGroupCode");
            ALL = new PropertyExpression[] {this._PermissionCode,this._PermissionName,this._PermissionGroupCode};
        }
         

        private PropertyExpression _PermissionCode;
        /// <summary>
        /// 权限代码,
        /// </summary>
        public PropertyExpression PermissionCode { get{return _PermissionCode;}}
        private PropertyExpression _PermissionName;
        /// <summary>
        /// 权限名称,
        /// </summary>
        public PropertyExpression PermissionName { get{return _PermissionName;}}
        private PropertyExpression _PermissionGroupCode;
        /// <summary>
        /// 所属组,
        /// </summary>
        public PropertyExpression PermissionGroupCode { get{return _PermissionGroupCode;}}



        private PermissionGroupDescriptor _PermissionGroup;
        public PermissionGroupDescriptor PermissionGroup 
        { 
            get
            {
                if(_PermissionGroup==null) _PermissionGroup=new PermissionGroupDescriptor(base.Prefix+"PermissionGroup.");
                return _PermissionGroup;
            }
        }
    }
     #endregion


    #region Permissions
    /// <summary>
    /// Permission,权限
    /// </summary>
    [Table]
    public partial class Permissions:EntityList<Permission> 
    {
        
    }
    #endregion


    #region PermissionGroup
    /// <summary>
    /// PermissionGroup,
    /// </summary>
    [Table]
    public partial class PermissionGroup 
    {
        
        public PermissionGroup()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 权限组代码,
        /// </summary>
        [DisplayName("权限组代码")]
        [Column(IsPrimaryKey = true,Size = 30)]
[Required(ErrorMessage="权限组代码不允许空")]
[MaxLength(30,ErrorMessage="权限组代码不能超过30个字")]
 
        public string PermissionGroupCode {  get; set; }


        /// <summary>
        /// 权限组名称,
        /// </summary>
        [DisplayName("权限组名称")]
        [Column(Size = 30)]
[Required(ErrorMessage="权限组名称不允许空")]
[MaxLength(30,ErrorMessage="权限组名称不能超过30个字")]
 
        public string PermissionGroupName {  get; set; }


        #endregion

    }
    #endregion
    #region PermissionGroupProperties
    public static partial class PermissionGroup_
    {
    
        private static PermissionGroupDescriptor instance = new PermissionGroupDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 权限组代码,
        /// </summary>
        public static PropertyExpression PermissionGroupCode { get{return instance.PermissionGroupCode;}} 
        /// <summary>
        /// 权限组名称,
        /// </summary>
        public static PropertyExpression PermissionGroupName { get{return instance.PermissionGroupName;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PermissionGroupDescriptor
    public partial class PermissionGroupDescriptor:ObjectDescriptorBase
    {
     
        public PermissionGroupDescriptor(string prefix):base(prefix)
        {  
    
            this._PermissionGroupCode = new PropertyExpression(prefix + "PermissionGroupCode");
            this._PermissionGroupName = new PropertyExpression(prefix + "PermissionGroupName");
            ALL = new PropertyExpression[] {this._PermissionGroupCode,this._PermissionGroupName};
        }
         

        private PropertyExpression _PermissionGroupCode;
        /// <summary>
        /// 权限组代码,
        /// </summary>
        public PropertyExpression PermissionGroupCode { get{return _PermissionGroupCode;}}
        private PropertyExpression _PermissionGroupName;
        /// <summary>
        /// 权限组名称,
        /// </summary>
        public PropertyExpression PermissionGroupName { get{return _PermissionGroupName;}}



    }
     #endregion


    #region PermissionGroups
    /// <summary>
    /// PermissionGroup,
    /// </summary>
    [Table]
    public partial class PermissionGroups:EntityList<PermissionGroup> 
    {
        
    }
    #endregion


    #region EmployeePermission
    /// <summary>
    /// EmployeePermission,员工拥有的权限
    /// </summary>
    [Table]
    public partial class EmployeePermission 
    {
        
        public EmployeePermission()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// EmployeeId,
        /// </summary>
        [DisplayName("EmployeeId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="EmployeeId不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// PermissionCode,
        /// </summary>
        [DisplayName("PermissionCode")]
        [Column(IsPrimaryKey = true,Size = 30)]
[Required(ErrorMessage="PermissionCode不允许空")]
[MaxLength(30,ErrorMessage="PermissionCode不能超过30个字")]
 
        public string PermissionCode {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// EmployeePermission.Permission,
        /// </summary>
        [Relation("this.PermissionCode=out.PermissionCode")]
        public Permission Permission { get;  set;  } 



        /// <summary>
        /// EmployeePermission.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region EmployeePermissionProperties
    public static partial class EmployeePermission_
    {
    
        private static EmployeePermissionDescriptor instance = new EmployeePermissionDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// PermissionCode,
        /// </summary>
        public static PropertyExpression PermissionCode { get{return instance.PermissionCode;}}


 
        /// <summary>
        /// EmployeePermission.Permission,
        /// </summary>
        public static PermissionDescriptor Permission { get{return instance.Permission;}} 
        /// <summary>
        /// EmployeePermission.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region EmployeePermissionDescriptor
    public partial class EmployeePermissionDescriptor:ObjectDescriptorBase
    {
     
        public EmployeePermissionDescriptor(string prefix):base(prefix)
        {  
    
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._PermissionCode = new PropertyExpression(prefix + "PermissionCode");
            ALL = new PropertyExpression[] {this._EmployeeId,this._PermissionCode};
        }
         

        private PropertyExpression _EmployeeId;
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _PermissionCode;
        /// <summary>
        /// PermissionCode,
        /// </summary>
        public PropertyExpression PermissionCode { get{return _PermissionCode;}}



        private PermissionDescriptor _Permission;
        public PermissionDescriptor Permission 
        { 
            get
            {
                if(_Permission==null) _Permission=new PermissionDescriptor(base.Prefix+"Permission.");
                return _Permission;
            }
        }
        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region EmployeePermissions
    /// <summary>
    /// EmployeePermission,员工拥有的权限
    /// </summary>
    [Table]
    public partial class EmployeePermissions:EntityList<EmployeePermission> 
    {
        
    }
    #endregion


    #region CompanyRegister
    /// <summary>
    /// CompanyRegister,待审核用户 
    /// </summary>
    [Table]
    public partial class CompanyRegister 
    {
        
        public CompanyRegister()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// CompanyRegisterId,
        /// </summary>
        [DisplayName("CompanyRegisterId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="CompanyRegisterId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CompanyRegisterId {  get; set; }


        /// <summary>
        /// 用户名,
        /// </summary>
        [DisplayName("用户名")]
        [Column(Size = 20)]
[Required(ErrorMessage="用户名不允许空")]
[MaxLength(20,ErrorMessage="用户名不能超过20个字")]
[RegularExpression(@"^[a-zA-Z0-9]{6,20}$", ErrorMessage = "用户名只允许6-20位以内的字母、数字")] 
        public string LoginNo {  get; set; }


        /// <summary>
        /// 密码,
        /// </summary>
        [DisplayName("密码")]
        [Column(Size = 40)]
[Required(ErrorMessage="密码不允许空")]
[MaxLength(40,ErrorMessage="密码不能超过40个字")]
 
        public string Password {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 20)]
[Required(ErrorMessage="手机不允许空")]
[MaxLength(20,ErrorMessage="手机不能超过20个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 企业名称,
        /// </summary>
        [DisplayName("企业名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="企业名称不允许空")]
[MaxLength(20,ErrorMessage="企业名称不能超过20个字")]
 
        public string CompanyName {  get; set; }


        /// <summary>
        /// 地区,
        /// </summary>
        [DisplayName("地区")]
        [Column()]
[Required(ErrorMessage="地区不允许空")]
 
        public long AreaId {  get; set; }


        /// <summary>
        /// 营业执照号码,
        /// </summary>
        [DisplayName("营业执照号码")]
        [Column(Size = 50)]
[Required(ErrorMessage="营业执照号码不允许空")]
[MaxLength(50,ErrorMessage="营业执照号码不能超过50个字")]
 
        public string Certificate {  get; set; }


        /// <summary>
        /// 营业执照图片,
        /// </summary>
        [DisplayName("营业执照图片")]
        [Column(Size = 200)]
[Required(ErrorMessage="营业执照图片不允许空")]
[MaxLength(200,ErrorMessage="营业执照图片不能超过200个字")]
 
        public string CertificateImage {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// Ip,
        /// </summary>
        [DisplayName("Ip")]
        [Column(Size = 50)]
[Required(ErrorMessage="Ip不允许空")]
[MaxLength(50,ErrorMessage="Ip不能超过50个字")]
 
        public string Ip {  get; set; }


        /// <summary>
        /// 审核状态,
        /// </summary>
        [DisplayName("审核状态")]
        [Column()]
[Required(ErrorMessage="审核状态不允许空")]
 
        public long AuditStateId {  get; set; }


        /// <summary>
        /// 审核备注,
        /// </summary>
        [DisplayName("审核备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="审核备注不能超过200个字")]
 
        public string StateRemark {  get; set; }


        #endregion

    }
    #endregion
    #region CompanyRegisterProperties
    public static partial class CompanyRegister_
    {
    
        private static CompanyRegisterDescriptor instance = new CompanyRegisterDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// CompanyRegisterId,
        /// </summary>
        public static PropertyExpression CompanyRegisterId { get{return instance.CompanyRegisterId;}} 
        /// <summary>
        /// 用户名,
        /// </summary>
        public static PropertyExpression LoginNo { get{return instance.LoginNo;}} 
        /// <summary>
        /// 密码,
        /// </summary>
        public static PropertyExpression Password { get{return instance.Password;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 企业名称,
        /// </summary>
        public static PropertyExpression CompanyName { get{return instance.CompanyName;}} 
        /// <summary>
        /// 地区,
        /// </summary>
        public static PropertyExpression AreaId { get{return instance.AreaId;}} 
        /// <summary>
        /// 营业执照号码,
        /// </summary>
        public static PropertyExpression Certificate { get{return instance.Certificate;}} 
        /// <summary>
        /// 营业执照图片,
        /// </summary>
        public static PropertyExpression CertificateImage { get{return instance.CertificateImage;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// Ip,
        /// </summary>
        public static PropertyExpression Ip { get{return instance.Ip;}} 
        /// <summary>
        /// 审核状态,
        /// </summary>
        public static PropertyExpression AuditStateId { get{return instance.AuditStateId;}} 
        /// <summary>
        /// 审核备注,
        /// </summary>
        public static PropertyExpression StateRemark { get{return instance.StateRemark;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CompanyRegisterDescriptor
    public partial class CompanyRegisterDescriptor:ObjectDescriptorBase
    {
     
        public CompanyRegisterDescriptor(string prefix):base(prefix)
        {  
    
            this._CompanyRegisterId = new PropertyExpression(prefix + "CompanyRegisterId");
            this._LoginNo = new PropertyExpression(prefix + "LoginNo");
            this._Password = new PropertyExpression(prefix + "Password");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._CompanyName = new PropertyExpression(prefix + "CompanyName");
            this._AreaId = new PropertyExpression(prefix + "AreaId");
            this._Certificate = new PropertyExpression(prefix + "Certificate");
            this._CertificateImage = new PropertyExpression(prefix + "CertificateImage");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._Ip = new PropertyExpression(prefix + "Ip");
            this._AuditStateId = new PropertyExpression(prefix + "AuditStateId");
            this._StateRemark = new PropertyExpression(prefix + "StateRemark");
            ALL = new PropertyExpression[] {this._CompanyRegisterId,this._LoginNo,this._Password,this._Mb,this._CompanyName,this._AreaId,this._Certificate,this._CertificateImage,this._CreateTime,this._Ip,this._AuditStateId,this._StateRemark};
        }
         

        private PropertyExpression _CompanyRegisterId;
        /// <summary>
        /// CompanyRegisterId,
        /// </summary>
        public PropertyExpression CompanyRegisterId { get{return _CompanyRegisterId;}}
        private PropertyExpression _LoginNo;
        /// <summary>
        /// 用户名,
        /// </summary>
        public PropertyExpression LoginNo { get{return _LoginNo;}}
        private PropertyExpression _Password;
        /// <summary>
        /// 密码,
        /// </summary>
        public PropertyExpression Password { get{return _Password;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _CompanyName;
        /// <summary>
        /// 企业名称,
        /// </summary>
        public PropertyExpression CompanyName { get{return _CompanyName;}}
        private PropertyExpression _AreaId;
        /// <summary>
        /// 地区,
        /// </summary>
        public PropertyExpression AreaId { get{return _AreaId;}}
        private PropertyExpression _Certificate;
        /// <summary>
        /// 营业执照号码,
        /// </summary>
        public PropertyExpression Certificate { get{return _Certificate;}}
        private PropertyExpression _CertificateImage;
        /// <summary>
        /// 营业执照图片,
        /// </summary>
        public PropertyExpression CertificateImage { get{return _CertificateImage;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _Ip;
        /// <summary>
        /// Ip,
        /// </summary>
        public PropertyExpression Ip { get{return _Ip;}}
        private PropertyExpression _AuditStateId;
        /// <summary>
        /// 审核状态,
        /// </summary>
        public PropertyExpression AuditStateId { get{return _AuditStateId;}}
        private PropertyExpression _StateRemark;
        /// <summary>
        /// 审核备注,
        /// </summary>
        public PropertyExpression StateRemark { get{return _StateRemark;}}



    }
     #endregion


    #region CompanyRegisters
    /// <summary>
    /// CompanyRegister,待审核用户 
    /// </summary>
    [Table]
    public partial class CompanyRegisters:EntityList<CompanyRegister> 
    {
        
    }
    #endregion


    #region EmployeeAttendance
    /// <summary>
    /// EmployeeAttendance,考勤
    /// </summary>
    [Table]
    public partial class EmployeeAttendance 
    {
        
        public EmployeeAttendance()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// EmployeeAttendanceId,
        /// </summary>
        [DisplayName("EmployeeAttendanceId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="EmployeeAttendanceId不允许空")]
 
        public long EmployeeAttendanceId {  get; set; }


        /// <summary>
        /// 考勤员工,
        /// </summary>
        [DisplayName("考勤员工")]
        [Column()]
[Required(ErrorMessage="考勤员工不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 考勤时间,
        /// </summary>
        [DisplayName("考勤时间")]
        [Column()]
[Required(ErrorMessage="考勤时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 考勤类别,
        /// </summary>
        [DisplayName("考勤类别")]
        [Column()]
[Required(ErrorMessage="考勤类别不允许空")]
 
        public long AttendanceTypeId {  get; set; }


        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        [DisplayName("是否已标记地图")]
        [Column()]
[Required(ErrorMessage="是否已标记地图不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column()]
[Required(ErrorMessage="X不允许空")]
 
        public float X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column()]
[Required(ErrorMessage="Y不允许空")]
 
        public float Y {  get; set; }


        /// <summary>
        /// Ip,
        /// </summary>
        [DisplayName("Ip")]
        [Column(Size = 50)]
[Required(ErrorMessage="Ip不允许空")]
[MaxLength(50,ErrorMessage="Ip不能超过50个字")]
 
        public string Ip {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// EmployeeAttendance.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region EmployeeAttendanceProperties
    public static partial class EmployeeAttendance_
    {
    
        private static EmployeeAttendanceDescriptor instance = new EmployeeAttendanceDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// EmployeeAttendanceId,
        /// </summary>
        public static PropertyExpression EmployeeAttendanceId { get{return instance.EmployeeAttendanceId;}} 
        /// <summary>
        /// 考勤员工,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 考勤时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 考勤类别,
        /// </summary>
        public static PropertyExpression AttendanceTypeId { get{return instance.AttendanceTypeId;}} 
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// Ip,
        /// </summary>
        public static PropertyExpression Ip { get{return instance.Ip;}}


 
        /// <summary>
        /// EmployeeAttendance.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region EmployeeAttendanceDescriptor
    public partial class EmployeeAttendanceDescriptor:ObjectDescriptorBase
    {
     
        public EmployeeAttendanceDescriptor(string prefix):base(prefix)
        {  
    
            this._EmployeeAttendanceId = new PropertyExpression(prefix + "EmployeeAttendanceId");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._AttendanceTypeId = new PropertyExpression(prefix + "AttendanceTypeId");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._Ip = new PropertyExpression(prefix + "Ip");
            ALL = new PropertyExpression[] {this._EmployeeAttendanceId,this._EmployeeId,this._CreateTime,this._AttendanceTypeId,this._IsMapped,this._X,this._Y,this._Ip};
        }
         

        private PropertyExpression _EmployeeAttendanceId;
        /// <summary>
        /// EmployeeAttendanceId,
        /// </summary>
        public PropertyExpression EmployeeAttendanceId { get{return _EmployeeAttendanceId;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 考勤员工,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 考勤时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _AttendanceTypeId;
        /// <summary>
        /// 考勤类别,
        /// </summary>
        public PropertyExpression AttendanceTypeId { get{return _AttendanceTypeId;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _Ip;
        /// <summary>
        /// Ip,
        /// </summary>
        public PropertyExpression Ip { get{return _Ip;}}



        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region EmployeeAttendances
    /// <summary>
    /// EmployeeAttendance,考勤
    /// </summary>
    [Table]
    public partial class EmployeeAttendances:EntityList<EmployeeAttendance> 
    {
        
    }
    #endregion


    #region EmployeePosition
    /// <summary>
    /// EmployeePosition,员工实时位置
    /// </summary>
    [Table]
    public partial class EmployeePosition 
    {
        
        public EmployeePosition()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// EmployeePositionId,
        /// </summary>
        [DisplayName("EmployeePositionId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="EmployeePositionId不允许空")]
 
        public long EmployeePositionId {  get; set; }


        /// <summary>
        /// EmployeeId,
        /// </summary>
        [DisplayName("EmployeeId")]
        [Column()]
[Required(ErrorMessage="EmployeeId不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        [DisplayName("是否已标记地图")]
        [Column()]
[Required(ErrorMessage="是否已标记地图不允许空")]
 
        public bool IsMapped {  get; set; }


        /// <summary>
        /// X,
        /// </summary>
        [DisplayName("X")]
        [Column()]
[Required(ErrorMessage="X不允许空")]
 
        public float X {  get; set; }


        /// <summary>
        /// Y,
        /// </summary>
        [DisplayName("Y")]
        [Column()]
[Required(ErrorMessage="Y不允许空")]
 
        public float Y {  get; set; }


        /// <summary>
        /// Ip,
        /// </summary>
        [DisplayName("Ip")]
        [Column(Size = 50)]
[Required(ErrorMessage="Ip不允许空")]
[MaxLength(50,ErrorMessage="Ip不能超过50个字")]
 
        public string Ip {  get; set; }


        /// <summary>
        /// CreateTime,
        /// </summary>
        [DisplayName("CreateTime")]
        [Column()]
[Required(ErrorMessage="CreateTime不允许空")]
 
        public DateTime CreateTime {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// EmployeePosition.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region EmployeePositionProperties
    public static partial class EmployeePosition_
    {
    
        private static EmployeePositionDescriptor instance = new EmployeePositionDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// EmployeePositionId,
        /// </summary>
        public static PropertyExpression EmployeePositionId { get{return instance.EmployeePositionId;}} 
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public static PropertyExpression IsMapped { get{return instance.IsMapped;}} 
        /// <summary>
        /// X,
        /// </summary>
        public static PropertyExpression X { get{return instance.X;}} 
        /// <summary>
        /// Y,
        /// </summary>
        public static PropertyExpression Y { get{return instance.Y;}} 
        /// <summary>
        /// Ip,
        /// </summary>
        public static PropertyExpression Ip { get{return instance.Ip;}} 
        /// <summary>
        /// CreateTime,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}}


 
        /// <summary>
        /// EmployeePosition.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region EmployeePositionDescriptor
    public partial class EmployeePositionDescriptor:ObjectDescriptorBase
    {
     
        public EmployeePositionDescriptor(string prefix):base(prefix)
        {  
    
            this._EmployeePositionId = new PropertyExpression(prefix + "EmployeePositionId");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._IsMapped = new PropertyExpression(prefix + "IsMapped");
            this._X = new PropertyExpression(prefix + "X");
            this._Y = new PropertyExpression(prefix + "Y");
            this._Ip = new PropertyExpression(prefix + "Ip");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            ALL = new PropertyExpression[] {this._EmployeePositionId,this._EmployeeId,this._IsMapped,this._X,this._Y,this._Ip,this._CreateTime};
        }
         

        private PropertyExpression _EmployeePositionId;
        /// <summary>
        /// EmployeePositionId,
        /// </summary>
        public PropertyExpression EmployeePositionId { get{return _EmployeePositionId;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _IsMapped;
        /// <summary>
        /// 是否已标记地图,
        /// </summary>
        public PropertyExpression IsMapped { get{return _IsMapped;}}
        private PropertyExpression _X;
        /// <summary>
        /// X,
        /// </summary>
        public PropertyExpression X { get{return _X;}}
        private PropertyExpression _Y;
        /// <summary>
        /// Y,
        /// </summary>
        public PropertyExpression Y { get{return _Y;}}
        private PropertyExpression _Ip;
        /// <summary>
        /// Ip,
        /// </summary>
        public PropertyExpression Ip { get{return _Ip;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// CreateTime,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}



        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region EmployeePositions
    /// <summary>
    /// EmployeePosition,员工实时位置
    /// </summary>
    [Table]
    public partial class EmployeePositions:EntityList<EmployeePosition> 
    {
        
    }
    #endregion


    #region Advice
    /// <summary>
    /// Advice,建议反馈
    /// </summary>
    [Table]
    public partial class Advice 
    {
        
        public Advice()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// AdviceId,
        /// </summary>
        [DisplayName("AdviceId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="AdviceId不允许空")]
 
        public long AdviceId {  get; set; }


        /// <summary>
        /// EmployeeId,
        /// </summary>
        [DisplayName("EmployeeId")]
        [Column()]
[Required(ErrorMessage="EmployeeId不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 意见或建议内容,
        /// </summary>
        [DisplayName("意见或建议内容")]
        [Column()]
[Required(ErrorMessage="意见或建议内容不允许空")]
 
        public string Content {  get; set; }


        /// <summary>
        /// Ip,
        /// </summary>
        [DisplayName("Ip")]
        [Column(Size = 50)]
[Required(ErrorMessage="Ip不允许空")]
[MaxLength(50,ErrorMessage="Ip不能超过50个字")]
 
        public string Ip {  get; set; }


        /// <summary>
        /// CreateTime,
        /// </summary>
        [DisplayName("CreateTime")]
        [Column()]
[Required(ErrorMessage="CreateTime不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 客服备注,
        /// </summary>
        [DisplayName("客服备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="客服备注不能超过200个字")]
 
        public string Remark {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// Advice.Employee,
        /// </summary>
        [Relation("this.EmployeeId=out.EmployeeId")]
        public Employee Employee { get;  set;  } 



        #endregion
    }
    #endregion
    #region AdviceProperties
    public static partial class Advice_
    {
    
        private static AdviceDescriptor instance = new AdviceDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// AdviceId,
        /// </summary>
        public static PropertyExpression AdviceId { get{return instance.AdviceId;}} 
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 意见或建议内容,
        /// </summary>
        public static PropertyExpression Content { get{return instance.Content;}} 
        /// <summary>
        /// Ip,
        /// </summary>
        public static PropertyExpression Ip { get{return instance.Ip;}} 
        /// <summary>
        /// CreateTime,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 客服备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}}


 
        /// <summary>
        /// Advice.Employee,
        /// </summary>
        public static EmployeeDescriptor Employee { get{return instance.Employee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region AdviceDescriptor
    public partial class AdviceDescriptor:ObjectDescriptorBase
    {
     
        public AdviceDescriptor(string prefix):base(prefix)
        {  
    
            this._AdviceId = new PropertyExpression(prefix + "AdviceId");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._Content = new PropertyExpression(prefix + "Content");
            this._Ip = new PropertyExpression(prefix + "Ip");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._Remark = new PropertyExpression(prefix + "Remark");
            ALL = new PropertyExpression[] {this._AdviceId,this._EmployeeId,this._Content,this._Ip,this._CreateTime,this._Remark};
        }
         

        private PropertyExpression _AdviceId;
        /// <summary>
        /// AdviceId,
        /// </summary>
        public PropertyExpression AdviceId { get{return _AdviceId;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// EmployeeId,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _Content;
        /// <summary>
        /// 意见或建议内容,
        /// </summary>
        public PropertyExpression Content { get{return _Content;}}
        private PropertyExpression _Ip;
        /// <summary>
        /// Ip,
        /// </summary>
        public PropertyExpression Ip { get{return _Ip;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// CreateTime,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 客服备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}



        private EmployeeDescriptor _Employee;
        public EmployeeDescriptor Employee 
        { 
            get
            {
                if(_Employee==null) _Employee=new EmployeeDescriptor(base.Prefix+"Employee.");
                return _Employee;
            }
        }
    }
     #endregion


    #region Advices
    /// <summary>
    /// Advice,建议反馈
    /// </summary>
    [Table]
    public partial class Advices:EntityList<Advice> 
    {
        
    }
    #endregion


    #region ProductImage
    /// <summary>
    /// 商品图片,
    /// </summary>
    [Table]
    public partial class ProductImage 
    {
        
        public ProductImage()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// ProductImageId,
        /// </summary>
        [DisplayName("ProductImageId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="ProductImageId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long ProductImageId {  get; set; }


        /// <summary>
        /// ProductId,
        /// </summary>
        [DisplayName("ProductId")]
        [Column()]
[Required(ErrorMessage="ProductId不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 主图地址,
        /// </summary>
        [DisplayName("主图地址")]
        [Column(Size = 100)]
[Required(ErrorMessage="主图地址不允许空")]
[MaxLength(100,ErrorMessage="主图地址不能超过100个字")]
 
        public string Image500 {  get; set; }


        /// <summary>
        /// 主图地址,
        /// </summary>
        [DisplayName("主图地址")]
        [Column(Size = 100)]
[Required(ErrorMessage="主图地址不允许空")]
[MaxLength(100,ErrorMessage="主图地址不能超过100个字")]
 
        public string Image200 {  get; set; }


        /// <summary>
        /// 主图地址,
        /// </summary>
        [DisplayName("主图地址")]
        [Column(Size = 100)]
[Required(ErrorMessage="主图地址不允许空")]
[MaxLength(100,ErrorMessage="主图地址不能超过100个字")]
 
        public string Image60 {  get; set; }


        /// <summary>
        /// 是否主图,
        /// </summary>
        [DisplayName("是否主图")]
        [Column()]
[Required(ErrorMessage="是否主图不允许空")]
 
        public bool IsMain {  get; set; }


        /// <summary>
        /// 排序号,越大越前
        /// </summary>
        [DisplayName("排序号")]
        [Column()]
[Required(ErrorMessage="排序号不允许空")]
 
        public long Sequence {  get; set; }


        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        [DisplayName("图片Id")]
        [Column()]
[Required(ErrorMessage="图片Id不允许空")]
 
        public long ImageFileId {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// ProductImage.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        /// <summary>
        /// ProductImage.ImageFile,
        /// </summary>
        [Relation("this.ImageFileId=out.ImageFileId")]
        public ImageFile ImageFile { get;  set;  } 



        #endregion
    }
    #endregion
    #region ProductImageProperties
    public static partial class ProductImage_
    {
    
        private static ProductImageDescriptor instance = new ProductImageDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// ProductImageId,
        /// </summary>
        public static PropertyExpression ProductImageId { get{return instance.ProductImageId;}} 
        /// <summary>
        /// ProductId,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 主图地址,
        /// </summary>
        public static PropertyExpression Image500 { get{return instance.Image500;}} 
        /// <summary>
        /// 主图地址,
        /// </summary>
        public static PropertyExpression Image200 { get{return instance.Image200;}} 
        /// <summary>
        /// 主图地址,
        /// </summary>
        public static PropertyExpression Image60 { get{return instance.Image60;}} 
        /// <summary>
        /// 是否主图,
        /// </summary>
        public static PropertyExpression IsMain { get{return instance.IsMain;}} 
        /// <summary>
        /// 排序号,越大越前
        /// </summary>
        public static PropertyExpression Sequence { get{return instance.Sequence;}} 
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public static PropertyExpression ImageFileId { get{return instance.ImageFileId;}}


 
        /// <summary>
        /// ProductImage.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}} 
        /// <summary>
        /// ProductImage.ImageFile,
        /// </summary>
        public static ImageFileDescriptor ImageFile { get{return instance.ImageFile;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ProductImageDescriptor
    public partial class ProductImageDescriptor:ObjectDescriptorBase
    {
     
        public ProductImageDescriptor(string prefix):base(prefix)
        {  
    
            this._ProductImageId = new PropertyExpression(prefix + "ProductImageId");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._Image500 = new PropertyExpression(prefix + "Image500");
            this._Image200 = new PropertyExpression(prefix + "Image200");
            this._Image60 = new PropertyExpression(prefix + "Image60");
            this._IsMain = new PropertyExpression(prefix + "IsMain");
            this._Sequence = new PropertyExpression(prefix + "Sequence");
            this._ImageFileId = new PropertyExpression(prefix + "ImageFileId");
            ALL = new PropertyExpression[] {this._ProductImageId,this._ProductId,this._Image500,this._Image200,this._Image60,this._IsMain,this._Sequence,this._ImageFileId};
        }
         

        private PropertyExpression _ProductImageId;
        /// <summary>
        /// ProductImageId,
        /// </summary>
        public PropertyExpression ProductImageId { get{return _ProductImageId;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// ProductId,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _Image500;
        /// <summary>
        /// 主图地址,
        /// </summary>
        public PropertyExpression Image500 { get{return _Image500;}}
        private PropertyExpression _Image200;
        /// <summary>
        /// 主图地址,
        /// </summary>
        public PropertyExpression Image200 { get{return _Image200;}}
        private PropertyExpression _Image60;
        /// <summary>
        /// 主图地址,
        /// </summary>
        public PropertyExpression Image60 { get{return _Image60;}}
        private PropertyExpression _IsMain;
        /// <summary>
        /// 是否主图,
        /// </summary>
        public PropertyExpression IsMain { get{return _IsMain;}}
        private PropertyExpression _Sequence;
        /// <summary>
        /// 排序号,越大越前
        /// </summary>
        public PropertyExpression Sequence { get{return _Sequence;}}
        private PropertyExpression _ImageFileId;
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public PropertyExpression ImageFileId { get{return _ImageFileId;}}



        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
        private ImageFileDescriptor _ImageFile;
        public ImageFileDescriptor ImageFile 
        { 
            get
            {
                if(_ImageFile==null) _ImageFile=new ImageFileDescriptor(base.Prefix+"ImageFile.");
                return _ImageFile;
            }
        }
    }
     #endregion


    #region ProductImages
    /// <summary>
    /// 商品图片,
    /// </summary>
    [Table]
    public partial class ProductImages:EntityList<ProductImage> 
    {
        
    }
    #endregion


    #region ImageFile
    /// <summary>
    /// ImageFile,
    /// </summary>
    [Table]
    public partial class ImageFile 
    {
        
        public ImageFile()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// ImageFileId,
        /// </summary>
        [DisplayName("ImageFileId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="ImageFileId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long ImageFileId {  get; set; }


        /// <summary>
        /// TableName,
        /// </summary>
        [DisplayName("TableName")]
        [Column(Size = 50)]
[Required(ErrorMessage="TableName不允许空")]
[MaxLength(50,ErrorMessage="TableName不能超过50个字")]
 
        public string TableName {  get; set; }


        /// <summary>
        /// TableId,
        /// </summary>
        [DisplayName("TableId")]
        [Column()]
[Required(ErrorMessage="TableId不允许空")]
 
        public long TableId {  get; set; }


        #endregion

    }
    #endregion
    #region ImageFileProperties
    public static partial class ImageFile_
    {
    
        private static ImageFileDescriptor instance = new ImageFileDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// ImageFileId,
        /// </summary>
        public static PropertyExpression ImageFileId { get{return instance.ImageFileId;}} 
        /// <summary>
        /// TableName,
        /// </summary>
        public static PropertyExpression TableName { get{return instance.TableName;}} 
        /// <summary>
        /// TableId,
        /// </summary>
        public static PropertyExpression TableId { get{return instance.TableId;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ImageFileDescriptor
    public partial class ImageFileDescriptor:ObjectDescriptorBase
    {
     
        public ImageFileDescriptor(string prefix):base(prefix)
        {  
    
            this._ImageFileId = new PropertyExpression(prefix + "ImageFileId");
            this._TableName = new PropertyExpression(prefix + "TableName");
            this._TableId = new PropertyExpression(prefix + "TableId");
            ALL = new PropertyExpression[] {this._ImageFileId,this._TableName,this._TableId};
        }
         

        private PropertyExpression _ImageFileId;
        /// <summary>
        /// ImageFileId,
        /// </summary>
        public PropertyExpression ImageFileId { get{return _ImageFileId;}}
        private PropertyExpression _TableName;
        /// <summary>
        /// TableName,
        /// </summary>
        public PropertyExpression TableName { get{return _TableName;}}
        private PropertyExpression _TableId;
        /// <summary>
        /// TableId,
        /// </summary>
        public PropertyExpression TableId { get{return _TableId;}}



    }
     #endregion


    #region ImageFiles
    /// <summary>
    /// ImageFile,
    /// </summary>
    [Table]
    public partial class ImageFiles:EntityList<ImageFile> 
    {
        
    }
    #endregion


    #region Manager
    /// <summary>
    /// 平台管理员,
    /// </summary>
    [Table]
    public partial class Manager 
    {
        
        public Manager()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// ManagerId,
        /// </summary>
        [DisplayName("ManagerId")]
        [Column()]
 
        public long? ManagerId {  get; set; }


        /// <summary>
        /// 员工姓名,
        /// </summary>
        [DisplayName("员工姓名")]
        [Column(Size = 20)]
[Required(ErrorMessage="员工姓名不允许空")]
[MaxLength(20,ErrorMessage="员工姓名不能超过20个字")]
 
        public string ManagerName {  get; set; }


        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        [DisplayName("登录号")]
        [Column(Size = 30)]
[Required(ErrorMessage="登录号不允许空")]
[MaxLength(30,ErrorMessage="登录号不能超过30个字")]
 
        public string LoginNo {  get; set; }


        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        [DisplayName("登陆密码")]
        [Column(Size = 40)]
[Required(ErrorMessage="登陆密码不允许空")]
[MaxLength(40,ErrorMessage="登陆密码不能超过40个字")]
 
        public string Password {  get; set; }


        /// <summary>
        /// 是否可用,,false表示删除或离职
        /// </summary>
        [DisplayName("是否可用")]
        [Column()]
[Required(ErrorMessage="是否可用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 手机,
        /// </summary>
        [DisplayName("手机")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="手机不能超过100个字")]
 
        public string Mb {  get; set; }


        /// <summary>
        /// 邮箱,
        /// </summary>
        [DisplayName("邮箱")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="邮箱不能超过100个字")]
 
        public string Email {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        #endregion

    }
    #endregion
    #region ManagerProperties
    public static partial class Manager_
    {
    
        private static ManagerDescriptor instance = new ManagerDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// ManagerId,
        /// </summary>
        public static PropertyExpression ManagerId { get{return instance.ManagerId;}} 
        /// <summary>
        /// 员工姓名,
        /// </summary>
        public static PropertyExpression ManagerName { get{return instance.ManagerName;}} 
        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        public static PropertyExpression LoginNo { get{return instance.LoginNo;}} 
        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        public static PropertyExpression Password { get{return instance.Password;}} 
        /// <summary>
        /// 是否可用,,false表示删除或离职
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 手机,
        /// </summary>
        public static PropertyExpression Mb { get{return instance.Mb;}} 
        /// <summary>
        /// 邮箱,
        /// </summary>
        public static PropertyExpression Email { get{return instance.Email;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ManagerDescriptor
    public partial class ManagerDescriptor:ObjectDescriptorBase
    {
     
        public ManagerDescriptor(string prefix):base(prefix)
        {  
    
            this._ManagerId = new PropertyExpression(prefix + "ManagerId");
            this._ManagerName = new PropertyExpression(prefix + "ManagerName");
            this._LoginNo = new PropertyExpression(prefix + "LoginNo");
            this._Password = new PropertyExpression(prefix + "Password");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._Mb = new PropertyExpression(prefix + "Mb");
            this._Email = new PropertyExpression(prefix + "Email");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            ALL = new PropertyExpression[] {this._ManagerId,this._ManagerName,this._LoginNo,this._Password,this._IsActive,this._Mb,this._Email,this._Remark,this._CreateTime};
        }
         

        private PropertyExpression _ManagerId;
        /// <summary>
        /// ManagerId,
        /// </summary>
        public PropertyExpression ManagerId { get{return _ManagerId;}}
        private PropertyExpression _ManagerName;
        /// <summary>
        /// 员工姓名,
        /// </summary>
        public PropertyExpression ManagerName { get{return _ManagerName;}}
        private PropertyExpression _LoginNo;
        /// <summary>
        /// 登录号,，全局唯一，只允许英文和数字
        /// </summary>
        public PropertyExpression LoginNo { get{return _LoginNo;}}
        private PropertyExpression _Password;
        /// <summary>
        /// 登陆密码,,MD5
        /// </summary>
        public PropertyExpression Password { get{return _Password;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否可用,,false表示删除或离职
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _Mb;
        /// <summary>
        /// 手机,
        /// </summary>
        public PropertyExpression Mb { get{return _Mb;}}
        private PropertyExpression _Email;
        /// <summary>
        /// 邮箱,
        /// </summary>
        public PropertyExpression Email { get{return _Email;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}



    }
     #endregion


    #region Managers
    /// <summary>
    /// 平台管理员,
    /// </summary>
    [Table]
    public partial class Managers:EntityList<Manager> 
    {
        
    }
    #endregion


    #region CompanyLink
    /// <summary>
    /// 协同办公,
    /// </summary>
    [Table]
    public partial class CompanyLink 
    {
        
        public CompanyLink()
        {

            LaunchTime=DateTime.Now;
            AcceptTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// CompanyLinkId,
        /// </summary>
        [DisplayName("CompanyLinkId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="CompanyLinkId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CompanyLinkId {  get; set; }


        /// <summary>
        /// 发起者,
        /// </summary>
        [DisplayName("发起者")]
        [Column()]
[Required(ErrorMessage="发起者不允许空")]
 
        public long LaunchCompanyId {  get; set; }


        /// <summary>
        /// 接受者,
        /// </summary>
        [DisplayName("接受者")]
        [Column()]
[Required(ErrorMessage="接受者不允许空")]
 
        public long AcceptCompanyId {  get; set; }


        /// <summary>
        /// 发起时间,
        /// </summary>
        [DisplayName("发起时间")]
        [Column()]
[Required(ErrorMessage="发起时间不允许空")]
 
        public DateTime LaunchTime {  get; set; }


        /// <summary>
        /// 发起消息,
        /// </summary>
        [DisplayName("发起消息")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="发起消息不能超过200个字")]
 
        public string LaunchMessage {  get; set; }


        /// <summary>
        /// 接受时间,
        /// </summary>
        [DisplayName("接受时间")]
        [Column()]
[Required(ErrorMessage="接受时间不允许空")]
 
        public DateTime AcceptTime {  get; set; }


        #endregion

    }
    #endregion
    #region CompanyLinkProperties
    public static partial class CompanyLink_
    {
    
        private static CompanyLinkDescriptor instance = new CompanyLinkDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// CompanyLinkId,
        /// </summary>
        public static PropertyExpression CompanyLinkId { get{return instance.CompanyLinkId;}} 
        /// <summary>
        /// 发起者,
        /// </summary>
        public static PropertyExpression LaunchCompanyId { get{return instance.LaunchCompanyId;}} 
        /// <summary>
        /// 接受者,
        /// </summary>
        public static PropertyExpression AcceptCompanyId { get{return instance.AcceptCompanyId;}} 
        /// <summary>
        /// 发起时间,
        /// </summary>
        public static PropertyExpression LaunchTime { get{return instance.LaunchTime;}} 
        /// <summary>
        /// 发起消息,
        /// </summary>
        public static PropertyExpression LaunchMessage { get{return instance.LaunchMessage;}} 
        /// <summary>
        /// 接受时间,
        /// </summary>
        public static PropertyExpression AcceptTime { get{return instance.AcceptTime;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CompanyLinkDescriptor
    public partial class CompanyLinkDescriptor:ObjectDescriptorBase
    {
     
        public CompanyLinkDescriptor(string prefix):base(prefix)
        {  
    
            this._CompanyLinkId = new PropertyExpression(prefix + "CompanyLinkId");
            this._LaunchCompanyId = new PropertyExpression(prefix + "LaunchCompanyId");
            this._AcceptCompanyId = new PropertyExpression(prefix + "AcceptCompanyId");
            this._LaunchTime = new PropertyExpression(prefix + "LaunchTime");
            this._LaunchMessage = new PropertyExpression(prefix + "LaunchMessage");
            this._AcceptTime = new PropertyExpression(prefix + "AcceptTime");
            ALL = new PropertyExpression[] {this._CompanyLinkId,this._LaunchCompanyId,this._AcceptCompanyId,this._LaunchTime,this._LaunchMessage,this._AcceptTime};
        }
         

        private PropertyExpression _CompanyLinkId;
        /// <summary>
        /// CompanyLinkId,
        /// </summary>
        public PropertyExpression CompanyLinkId { get{return _CompanyLinkId;}}
        private PropertyExpression _LaunchCompanyId;
        /// <summary>
        /// 发起者,
        /// </summary>
        public PropertyExpression LaunchCompanyId { get{return _LaunchCompanyId;}}
        private PropertyExpression _AcceptCompanyId;
        /// <summary>
        /// 接受者,
        /// </summary>
        public PropertyExpression AcceptCompanyId { get{return _AcceptCompanyId;}}
        private PropertyExpression _LaunchTime;
        /// <summary>
        /// 发起时间,
        /// </summary>
        public PropertyExpression LaunchTime { get{return _LaunchTime;}}
        private PropertyExpression _LaunchMessage;
        /// <summary>
        /// 发起消息,
        /// </summary>
        public PropertyExpression LaunchMessage { get{return _LaunchMessage;}}
        private PropertyExpression _AcceptTime;
        /// <summary>
        /// 接受时间,
        /// </summary>
        public PropertyExpression AcceptTime { get{return _AcceptTime;}}



    }
     #endregion


    #region CompanyLinks
    /// <summary>
    /// 协同办公,
    /// </summary>
    [Table]
    public partial class CompanyLinks:EntityList<CompanyLink> 
    {
        
    }
    #endregion


    #region CustomerLevel
    /// <summary>
    /// 客户级别,
    /// </summary>
    [Table]
    public partial class CustomerLevel 
    {
        
        public CustomerLevel()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// CustomerLevelId,
        /// </summary>
        [DisplayName("CustomerLevelId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="CustomerLevelId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long CustomerLevelId {  get; set; }


        /// <summary>
        /// 客户等级名称,
        /// </summary>
        [DisplayName("客户等级名称")]
        [Column(Size = 20)]
[Required(ErrorMessage="客户等级名称不允许空")]
[MaxLength(20,ErrorMessage="客户等级名称不能超过20个字")]
 
        public string CustomerLevelName {  get; set; }


        /// <summary>
        /// 排序号,
        /// </summary>
        [DisplayName("排序号")]
        [Column()]
[Required(ErrorMessage="排序号不允许空")]
 
        public long Turn {  get; set; }


        /// <summary>
        /// 所属企业,
        /// </summary>
        [DisplayName("所属企业")]
        [Column()]
[Required(ErrorMessage="所属企业不允许空")]
 
        public long CompanyId {  get; set; }


        #endregion

    }
    #endregion
    #region CustomerLevelProperties
    public static partial class CustomerLevel_
    {
    
        private static CustomerLevelDescriptor instance = new CustomerLevelDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// CustomerLevelId,
        /// </summary>
        public static PropertyExpression CustomerLevelId { get{return instance.CustomerLevelId;}} 
        /// <summary>
        /// 客户等级名称,
        /// </summary>
        public static PropertyExpression CustomerLevelName { get{return instance.CustomerLevelName;}} 
        /// <summary>
        /// 排序号,
        /// </summary>
        public static PropertyExpression Turn { get{return instance.Turn;}} 
        /// <summary>
        /// 所属企业,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region CustomerLevelDescriptor
    public partial class CustomerLevelDescriptor:ObjectDescriptorBase
    {
     
        public CustomerLevelDescriptor(string prefix):base(prefix)
        {  
    
            this._CustomerLevelId = new PropertyExpression(prefix + "CustomerLevelId");
            this._CustomerLevelName = new PropertyExpression(prefix + "CustomerLevelName");
            this._Turn = new PropertyExpression(prefix + "Turn");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            ALL = new PropertyExpression[] {this._CustomerLevelId,this._CustomerLevelName,this._Turn,this._CompanyId};
        }
         

        private PropertyExpression _CustomerLevelId;
        /// <summary>
        /// CustomerLevelId,
        /// </summary>
        public PropertyExpression CustomerLevelId { get{return _CustomerLevelId;}}
        private PropertyExpression _CustomerLevelName;
        /// <summary>
        /// 客户等级名称,
        /// </summary>
        public PropertyExpression CustomerLevelName { get{return _CustomerLevelName;}}
        private PropertyExpression _Turn;
        /// <summary>
        /// 排序号,
        /// </summary>
        public PropertyExpression Turn { get{return _Turn;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属企业,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}



    }
     #endregion


    #region CustomerLevels
    /// <summary>
    /// 客户级别,
    /// </summary>
    [Table]
    public partial class CustomerLevels:EntityList<CustomerLevel> 
    {
        
    }
    #endregion


    #region ProductGlobal
    /// <summary>
    /// Product2,
    /// </summary>
    [Table]
    public partial class ProductGlobal 
    {
        
        public ProductGlobal()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// ProductId,
        /// </summary>
        [DisplayName("ProductId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="ProductId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long ProductId {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 类别,标准
        /// </summary>
        [DisplayName("类别")]
        [Column()]
[Required(ErrorMessage="类别不允许空")]
 
        public long CategoryId {  get; set; }


        /// <summary>
        /// 商品名称,
        /// </summary>
        [DisplayName("商品名称")]
        [Column(Size = 100)]
[Required(ErrorMessage="商品名称不允许空")]
[MaxLength(100,ErrorMessage="商品名称不能超过100个字")]
 
        public string ProductName {  get; set; }


        /// <summary>
        /// 描述,
        /// </summary>
        [DisplayName("描述")]
        [Column()]
 
        public string Description {  get; set; }


        /// <summary>
        /// 条形码,标准
        /// </summary>
        [DisplayName("条形码")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="条形码不能超过30个字")]
 
        public string Barcode {  get; set; }


        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        [DisplayName("搜索缓存")]
        [Column(Size = 100)]
[Required(ErrorMessage="搜索缓存不允许空")]
[MaxLength(100,ErrorMessage="搜索缓存不能超过100个字")]
 
        public string SearchKey {  get; set; }


        /// <summary>
        /// 大图地址,标准
        /// </summary>
        [DisplayName("大图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="大图地址不能超过100个字")]
 
        public string Image400 {  get; set; }


        /// <summary>
        /// 中图地址,标准
        /// </summary>
        [DisplayName("中图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="中图地址不能超过100个字")]
 
        public string Image200 {  get; set; }


        /// <summary>
        /// 小图地址,标准
        /// </summary>
        [DisplayName("小图地址")]
        [Column(Size = 100)]
[MaxLength(100,ErrorMessage="小图地址不能超过100个字")]
 
        public string Image60 {  get; set; }


        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        [DisplayName("图片Id")]
        [Column()]
[Required(ErrorMessage="图片Id不允许空")]
 
        public long ImageFileId {  get; set; }


        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        [DisplayName("品牌Id")]
        [Column()]
[Required(ErrorMessage="品牌Id不允许空")]
 
        public long BrandId {  get; set; }


        /// <summary>
        /// 品牌,标准
        /// </summary>
        [DisplayName("品牌")]
        [Column(Size = 30)]
[Required(ErrorMessage="品牌不允许空")]
[MaxLength(30,ErrorMessage="品牌不能超过30个字")]
 
        public string BrandName {  get; set; }


        /// <summary>
        /// 单位,标准
        /// </summary>
        [DisplayName("单位")]
        [Column(Size = 10)]
[Required(ErrorMessage="单位不允许空")]
[MaxLength(10,ErrorMessage="单位不能超过10个字")]
 
        public string Unit {  get; set; }


        /// <summary>
        /// 保质期,标准
        /// </summary>
        [DisplayName("保质期")]
        [Column()]
[Required(ErrorMessage="保质期不允许空")]
 
        public long ShelfLife {  get; set; }


        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        [DisplayName("保质期单位")]
        [Column()]
[Required(ErrorMessage="保质期单位不允许空")]
 
        public long ShelfLifeUnitId {  get; set; }


        /// <summary>
        /// 是否进口,标准
        /// </summary>
        [DisplayName("是否进口")]
        [Column()]
 
        public bool? IsImported {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId1 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId2 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId3 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId4 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId5 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId6 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId7 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId8 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId9 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column()]
 
        public long? SpecId10 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription1 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription2 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription3 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription4 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription5 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription6 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription7 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription8 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription9 {  get; set; }


        /// <summary>
        /// 标准,
        /// </summary>
        [DisplayName("标准")]
        [Column(Size = 10)]
[MaxLength(10,ErrorMessage="标准不能超过10个字")]
 
        public string SpecDescription10 {  get; set; }


        /// <summary>
        /// 商品编号,
        /// </summary>
        [DisplayName("商品编号")]
        [Column(Size = 30)]
[Required(ErrorMessage="商品编号不允许空")]
[MaxLength(30,ErrorMessage="商品编号不能超过30个字")]
 
        public string ProductNo {  get; set; }


        /// <summary>
        /// 标准售价,
        /// </summary>
        [DisplayName("标准售价")]
        [Column(Size = 20)]
[Required(ErrorMessage="标准售价不允许空")]
 
        public decimal Price {  get; set; }


        /// <summary>
        /// 网上标准售价,网店
        /// </summary>
        [DisplayName("网上标准售价")]
        [Column(Size = 20)]
[Required(ErrorMessage="网上标准售价不允许空")]
 
        public decimal PriceOnline {  get; set; }


        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        [DisplayName("起订量")]
        [Column(Size = 20)]
[Required(ErrorMessage="起订量不允许空")]
 
        public decimal MinQuantity {  get; set; }


        /// <summary>
        /// 库存数量,
        /// </summary>
        [DisplayName("库存数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="库存数量不允许空")]
 
        public decimal StoreCount {  get; set; }


        /// <summary>
        /// 是否线下启用,
        /// </summary>
        [DisplayName("是否线下启用")]
        [Column()]
[Required(ErrorMessage="是否线下启用不允许空")]
 
        public bool IsActive {  get; set; }


        /// <summary>
        /// 是否网上启用,网店
        /// </summary>
        [DisplayName("是否网上启用")]
        [Column()]
[Required(ErrorMessage="是否网上启用不允许空")]
 
        public bool IsActiveOnline {  get; set; }


        /// <summary>
        /// 是否线下促销,
        /// </summary>
        [DisplayName("是否线下促销")]
        [Column()]
[Required(ErrorMessage="是否线下促销不允许空")]
 
        public bool IsPromotion {  get; set; }


        /// <summary>
        /// 是否网上促销,网店
        /// </summary>
        [DisplayName("是否网上促销")]
        [Column()]
[Required(ErrorMessage="是否网上促销不允许空")]
 
        public bool IsPromotionOnline {  get; set; }


        /// <summary>
        /// 是否新品上架,
        /// </summary>
        [DisplayName("是否新品上架")]
        [Column()]
[Required(ErrorMessage="是否新品上架不允许空")]
 
        public bool IsNew {  get; set; }


        /// <summary>
        /// 修改人,
        /// </summary>
        [DisplayName("修改人")]
        [Column()]
[Required(ErrorMessage="修改人不允许空")]
 
        public long EmployeeId {  get; set; }


        /// <summary>
        /// 领取来源Id,
        /// </summary>
        [DisplayName("领取来源Id")]
        [Column()]
[Required(ErrorMessage="领取来源Id不允许空")]
 
        public long SourceProductId {  get; set; }


        /// <summary>
        /// 审核员,
        /// </summary>
        [DisplayName("审核员")]
        [Column()]
[Required(ErrorMessage="审核员不允许空")]
 
        public long ManagerId {  get; set; }


        #endregion

    }
    #endregion
    #region ProductGlobalProperties
    public static partial class ProductGlobal_
    {
    
        private static ProductGlobalDescriptor instance = new ProductGlobalDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// ProductId,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 类别,标准
        /// </summary>
        public static PropertyExpression CategoryId { get{return instance.CategoryId;}} 
        /// <summary>
        /// 商品名称,
        /// </summary>
        public static PropertyExpression ProductName { get{return instance.ProductName;}} 
        /// <summary>
        /// 描述,
        /// </summary>
        public static PropertyExpression Description { get{return instance.Description;}} 
        /// <summary>
        /// 条形码,标准
        /// </summary>
        public static PropertyExpression Barcode { get{return instance.Barcode;}} 
        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        public static PropertyExpression SearchKey { get{return instance.SearchKey;}} 
        /// <summary>
        /// 大图地址,标准
        /// </summary>
        public static PropertyExpression Image400 { get{return instance.Image400;}} 
        /// <summary>
        /// 中图地址,标准
        /// </summary>
        public static PropertyExpression Image200 { get{return instance.Image200;}} 
        /// <summary>
        /// 小图地址,标准
        /// </summary>
        public static PropertyExpression Image60 { get{return instance.Image60;}} 
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public static PropertyExpression ImageFileId { get{return instance.ImageFileId;}} 
        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        public static PropertyExpression BrandId { get{return instance.BrandId;}} 
        /// <summary>
        /// 品牌,标准
        /// </summary>
        public static PropertyExpression BrandName { get{return instance.BrandName;}} 
        /// <summary>
        /// 单位,标准
        /// </summary>
        public static PropertyExpression Unit { get{return instance.Unit;}} 
        /// <summary>
        /// 保质期,标准
        /// </summary>
        public static PropertyExpression ShelfLife { get{return instance.ShelfLife;}} 
        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        public static PropertyExpression ShelfLifeUnitId { get{return instance.ShelfLifeUnitId;}} 
        /// <summary>
        /// 是否进口,标准
        /// </summary>
        public static PropertyExpression IsImported { get{return instance.IsImported;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId1 { get{return instance.SpecId1;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId2 { get{return instance.SpecId2;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId3 { get{return instance.SpecId3;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId4 { get{return instance.SpecId4;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId5 { get{return instance.SpecId5;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId6 { get{return instance.SpecId6;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId7 { get{return instance.SpecId7;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId8 { get{return instance.SpecId8;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId9 { get{return instance.SpecId9;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecId10 { get{return instance.SpecId10;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription1 { get{return instance.SpecDescription1;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription2 { get{return instance.SpecDescription2;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription3 { get{return instance.SpecDescription3;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription4 { get{return instance.SpecDescription4;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription5 { get{return instance.SpecDescription5;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription6 { get{return instance.SpecDescription6;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription7 { get{return instance.SpecDescription7;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription8 { get{return instance.SpecDescription8;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription9 { get{return instance.SpecDescription9;}} 
        /// <summary>
        /// 标准,
        /// </summary>
        public static PropertyExpression SpecDescription10 { get{return instance.SpecDescription10;}} 
        /// <summary>
        /// 商品编号,
        /// </summary>
        public static PropertyExpression ProductNo { get{return instance.ProductNo;}} 
        /// <summary>
        /// 标准售价,
        /// </summary>
        public static PropertyExpression Price { get{return instance.Price;}} 
        /// <summary>
        /// 网上标准售价,网店
        /// </summary>
        public static PropertyExpression PriceOnline { get{return instance.PriceOnline;}} 
        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        public static PropertyExpression MinQuantity { get{return instance.MinQuantity;}} 
        /// <summary>
        /// 库存数量,
        /// </summary>
        public static PropertyExpression StoreCount { get{return instance.StoreCount;}} 
        /// <summary>
        /// 是否线下启用,
        /// </summary>
        public static PropertyExpression IsActive { get{return instance.IsActive;}} 
        /// <summary>
        /// 是否网上启用,网店
        /// </summary>
        public static PropertyExpression IsActiveOnline { get{return instance.IsActiveOnline;}} 
        /// <summary>
        /// 是否线下促销,
        /// </summary>
        public static PropertyExpression IsPromotion { get{return instance.IsPromotion;}} 
        /// <summary>
        /// 是否网上促销,网店
        /// </summary>
        public static PropertyExpression IsPromotionOnline { get{return instance.IsPromotionOnline;}} 
        /// <summary>
        /// 是否新品上架,
        /// </summary>
        public static PropertyExpression IsNew { get{return instance.IsNew;}} 
        /// <summary>
        /// 修改人,
        /// </summary>
        public static PropertyExpression EmployeeId { get{return instance.EmployeeId;}} 
        /// <summary>
        /// 领取来源Id,
        /// </summary>
        public static PropertyExpression SourceProductId { get{return instance.SourceProductId;}} 
        /// <summary>
        /// 审核员,
        /// </summary>
        public static PropertyExpression ManagerId { get{return instance.ManagerId;}}




        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region ProductGlobalDescriptor
    public partial class ProductGlobalDescriptor:ObjectDescriptorBase
    {
     
        public ProductGlobalDescriptor(string prefix):base(prefix)
        {  
    
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._CategoryId = new PropertyExpression(prefix + "CategoryId");
            this._ProductName = new PropertyExpression(prefix + "ProductName");
            this._Description = new PropertyExpression(prefix + "Description");
            this._Barcode = new PropertyExpression(prefix + "Barcode");
            this._SearchKey = new PropertyExpression(prefix + "SearchKey");
            this._Image400 = new PropertyExpression(prefix + "Image400");
            this._Image200 = new PropertyExpression(prefix + "Image200");
            this._Image60 = new PropertyExpression(prefix + "Image60");
            this._ImageFileId = new PropertyExpression(prefix + "ImageFileId");
            this._BrandId = new PropertyExpression(prefix + "BrandId");
            this._BrandName = new PropertyExpression(prefix + "BrandName");
            this._Unit = new PropertyExpression(prefix + "Unit");
            this._ShelfLife = new PropertyExpression(prefix + "ShelfLife");
            this._ShelfLifeUnitId = new PropertyExpression(prefix + "ShelfLifeUnitId");
            this._IsImported = new PropertyExpression(prefix + "IsImported");
            this._SpecId1 = new PropertyExpression(prefix + "SpecId1");
            this._SpecId2 = new PropertyExpression(prefix + "SpecId2");
            this._SpecId3 = new PropertyExpression(prefix + "SpecId3");
            this._SpecId4 = new PropertyExpression(prefix + "SpecId4");
            this._SpecId5 = new PropertyExpression(prefix + "SpecId5");
            this._SpecId6 = new PropertyExpression(prefix + "SpecId6");
            this._SpecId7 = new PropertyExpression(prefix + "SpecId7");
            this._SpecId8 = new PropertyExpression(prefix + "SpecId8");
            this._SpecId9 = new PropertyExpression(prefix + "SpecId9");
            this._SpecId10 = new PropertyExpression(prefix + "SpecId10");
            this._SpecDescription1 = new PropertyExpression(prefix + "SpecDescription1");
            this._SpecDescription2 = new PropertyExpression(prefix + "SpecDescription2");
            this._SpecDescription3 = new PropertyExpression(prefix + "SpecDescription3");
            this._SpecDescription4 = new PropertyExpression(prefix + "SpecDescription4");
            this._SpecDescription5 = new PropertyExpression(prefix + "SpecDescription5");
            this._SpecDescription6 = new PropertyExpression(prefix + "SpecDescription6");
            this._SpecDescription7 = new PropertyExpression(prefix + "SpecDescription7");
            this._SpecDescription8 = new PropertyExpression(prefix + "SpecDescription8");
            this._SpecDescription9 = new PropertyExpression(prefix + "SpecDescription9");
            this._SpecDescription10 = new PropertyExpression(prefix + "SpecDescription10");
            this._ProductNo = new PropertyExpression(prefix + "ProductNo");
            this._Price = new PropertyExpression(prefix + "Price");
            this._PriceOnline = new PropertyExpression(prefix + "PriceOnline");
            this._MinQuantity = new PropertyExpression(prefix + "MinQuantity");
            this._StoreCount = new PropertyExpression(prefix + "StoreCount");
            this._IsActive = new PropertyExpression(prefix + "IsActive");
            this._IsActiveOnline = new PropertyExpression(prefix + "IsActiveOnline");
            this._IsPromotion = new PropertyExpression(prefix + "IsPromotion");
            this._IsPromotionOnline = new PropertyExpression(prefix + "IsPromotionOnline");
            this._IsNew = new PropertyExpression(prefix + "IsNew");
            this._EmployeeId = new PropertyExpression(prefix + "EmployeeId");
            this._SourceProductId = new PropertyExpression(prefix + "SourceProductId");
            this._ManagerId = new PropertyExpression(prefix + "ManagerId");
            ALL = new PropertyExpression[] {this._ProductId,this._CompanyId,this._CategoryId,this._ProductName,this._Description,this._Barcode,this._SearchKey,this._Image400,this._Image200,this._Image60,this._ImageFileId,this._BrandId,this._BrandName,this._Unit,this._ShelfLife,this._ShelfLifeUnitId,this._IsImported,this._SpecId1,this._SpecId2,this._SpecId3,this._SpecId4,this._SpecId5,this._SpecId6,this._SpecId7,this._SpecId8,this._SpecId9,this._SpecId10,this._SpecDescription1,this._SpecDescription2,this._SpecDescription3,this._SpecDescription4,this._SpecDescription5,this._SpecDescription6,this._SpecDescription7,this._SpecDescription8,this._SpecDescription9,this._SpecDescription10,this._ProductNo,this._Price,this._PriceOnline,this._MinQuantity,this._StoreCount,this._IsActive,this._IsActiveOnline,this._IsPromotion,this._IsPromotionOnline,this._IsNew,this._EmployeeId,this._SourceProductId,this._ManagerId};
        }
         

        private PropertyExpression _ProductId;
        /// <summary>
        /// ProductId,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _CategoryId;
        /// <summary>
        /// 类别,标准
        /// </summary>
        public PropertyExpression CategoryId { get{return _CategoryId;}}
        private PropertyExpression _ProductName;
        /// <summary>
        /// 商品名称,
        /// </summary>
        public PropertyExpression ProductName { get{return _ProductName;}}
        private PropertyExpression _Description;
        /// <summary>
        /// 描述,
        /// </summary>
        public PropertyExpression Description { get{return _Description;}}
        private PropertyExpression _Barcode;
        /// <summary>
        /// 条形码,标准
        /// </summary>
        public PropertyExpression Barcode { get{return _Barcode;}}
        private PropertyExpression _SearchKey;
        /// <summary>
        /// 搜索缓存,一般是拼音首字母
        /// </summary>
        public PropertyExpression SearchKey { get{return _SearchKey;}}
        private PropertyExpression _Image400;
        /// <summary>
        /// 大图地址,标准
        /// </summary>
        public PropertyExpression Image400 { get{return _Image400;}}
        private PropertyExpression _Image200;
        /// <summary>
        /// 中图地址,标准
        /// </summary>
        public PropertyExpression Image200 { get{return _Image200;}}
        private PropertyExpression _Image60;
        /// <summary>
        /// 小图地址,标准
        /// </summary>
        public PropertyExpression Image60 { get{return _Image60;}}
        private PropertyExpression _ImageFileId;
        /// <summary>
        /// 图片Id,标准-原始图
        /// </summary>
        public PropertyExpression ImageFileId { get{return _ImageFileId;}}
        private PropertyExpression _BrandId;
        /// <summary>
        /// 品牌Id,标准
        /// </summary>
        public PropertyExpression BrandId { get{return _BrandId;}}
        private PropertyExpression _BrandName;
        /// <summary>
        /// 品牌,标准
        /// </summary>
        public PropertyExpression BrandName { get{return _BrandName;}}
        private PropertyExpression _Unit;
        /// <summary>
        /// 单位,标准
        /// </summary>
        public PropertyExpression Unit { get{return _Unit;}}
        private PropertyExpression _ShelfLife;
        /// <summary>
        /// 保质期,标准
        /// </summary>
        public PropertyExpression ShelfLife { get{return _ShelfLife;}}
        private PropertyExpression _ShelfLifeUnitId;
        /// <summary>
        /// 保质期单位,标准,1=年,2=月,3=日,0=无保质期
        /// </summary>
        public PropertyExpression ShelfLifeUnitId { get{return _ShelfLifeUnitId;}}
        private PropertyExpression _IsImported;
        /// <summary>
        /// 是否进口,标准
        /// </summary>
        public PropertyExpression IsImported { get{return _IsImported;}}
        private PropertyExpression _SpecId1;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId1 { get{return _SpecId1;}}
        private PropertyExpression _SpecId2;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId2 { get{return _SpecId2;}}
        private PropertyExpression _SpecId3;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId3 { get{return _SpecId3;}}
        private PropertyExpression _SpecId4;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId4 { get{return _SpecId4;}}
        private PropertyExpression _SpecId5;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId5 { get{return _SpecId5;}}
        private PropertyExpression _SpecId6;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId6 { get{return _SpecId6;}}
        private PropertyExpression _SpecId7;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId7 { get{return _SpecId7;}}
        private PropertyExpression _SpecId8;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId8 { get{return _SpecId8;}}
        private PropertyExpression _SpecId9;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId9 { get{return _SpecId9;}}
        private PropertyExpression _SpecId10;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecId10 { get{return _SpecId10;}}
        private PropertyExpression _SpecDescription1;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription1 { get{return _SpecDescription1;}}
        private PropertyExpression _SpecDescription2;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription2 { get{return _SpecDescription2;}}
        private PropertyExpression _SpecDescription3;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription3 { get{return _SpecDescription3;}}
        private PropertyExpression _SpecDescription4;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription4 { get{return _SpecDescription4;}}
        private PropertyExpression _SpecDescription5;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription5 { get{return _SpecDescription5;}}
        private PropertyExpression _SpecDescription6;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription6 { get{return _SpecDescription6;}}
        private PropertyExpression _SpecDescription7;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription7 { get{return _SpecDescription7;}}
        private PropertyExpression _SpecDescription8;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription8 { get{return _SpecDescription8;}}
        private PropertyExpression _SpecDescription9;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription9 { get{return _SpecDescription9;}}
        private PropertyExpression _SpecDescription10;
        /// <summary>
        /// 标准,
        /// </summary>
        public PropertyExpression SpecDescription10 { get{return _SpecDescription10;}}
        private PropertyExpression _ProductNo;
        /// <summary>
        /// 商品编号,
        /// </summary>
        public PropertyExpression ProductNo { get{return _ProductNo;}}
        private PropertyExpression _Price;
        /// <summary>
        /// 标准售价,
        /// </summary>
        public PropertyExpression Price { get{return _Price;}}
        private PropertyExpression _PriceOnline;
        /// <summary>
        /// 网上标准售价,网店
        /// </summary>
        public PropertyExpression PriceOnline { get{return _PriceOnline;}}
        private PropertyExpression _MinQuantity;
        /// <summary>
        /// 起订量,0表示不限制
        /// </summary>
        public PropertyExpression MinQuantity { get{return _MinQuantity;}}
        private PropertyExpression _StoreCount;
        /// <summary>
        /// 库存数量,
        /// </summary>
        public PropertyExpression StoreCount { get{return _StoreCount;}}
        private PropertyExpression _IsActive;
        /// <summary>
        /// 是否线下启用,
        /// </summary>
        public PropertyExpression IsActive { get{return _IsActive;}}
        private PropertyExpression _IsActiveOnline;
        /// <summary>
        /// 是否网上启用,网店
        /// </summary>
        public PropertyExpression IsActiveOnline { get{return _IsActiveOnline;}}
        private PropertyExpression _IsPromotion;
        /// <summary>
        /// 是否线下促销,
        /// </summary>
        public PropertyExpression IsPromotion { get{return _IsPromotion;}}
        private PropertyExpression _IsPromotionOnline;
        /// <summary>
        /// 是否网上促销,网店
        /// </summary>
        public PropertyExpression IsPromotionOnline { get{return _IsPromotionOnline;}}
        private PropertyExpression _IsNew;
        /// <summary>
        /// 是否新品上架,
        /// </summary>
        public PropertyExpression IsNew { get{return _IsNew;}}
        private PropertyExpression _EmployeeId;
        /// <summary>
        /// 修改人,
        /// </summary>
        public PropertyExpression EmployeeId { get{return _EmployeeId;}}
        private PropertyExpression _SourceProductId;
        /// <summary>
        /// 领取来源Id,
        /// </summary>
        public PropertyExpression SourceProductId { get{return _SourceProductId;}}
        private PropertyExpression _ManagerId;
        /// <summary>
        /// 审核员,
        /// </summary>
        public PropertyExpression ManagerId { get{return _ManagerId;}}



    }
     #endregion


    #region ProductGlobals
    /// <summary>
    /// Product2,
    /// </summary>
    [Table]
    public partial class ProductGlobals:EntityList<ProductGlobal> 
    {
        
    }
    #endregion


    #region StoreInitial
    /// <summary>
    /// 期初库存设置,
    /// </summary>
    [Table]
    public partial class StoreInitial 
    {
        
        public StoreInitial()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// 仓库,
        /// </summary>
        [DisplayName("仓库")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="仓库不允许空")]
 
        public long StoreId {  get; set; }


        /// <summary>
        /// 商品,
        /// </summary>
        [DisplayName("商品")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="商品不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 合格状态,
        /// </summary>
        [DisplayName("合格状态")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="合格状态不允许空")]
 
        public QualityStyle QualityStyleId {  get; set; }


        /// <summary>
        /// 批号,
        /// </summary>
        [DisplayName("批号")]
        [Column(IsPrimaryKey = true,Size = 50)]
[Required(ErrorMessage="批号不允许空")]
[MaxLength(50,ErrorMessage="批号不能超过50个字")]
 
        public string LotNo {  get; set; }


        /// <summary>
        /// 总数,
        /// </summary>
        [DisplayName("总数")]
        [Column(Size = 20)]
[Required(ErrorMessage="总数不允许空")]
 
        public decimal Quantity {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// StoreInitial.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        /// <summary>
        /// StoreInitial.Store,
        /// </summary>
        [Relation("this.StoreId=out.StoreId")]
        public Store Store { get;  set;  } 



        #endregion
    }
    #endregion
    #region StoreInitialProperties
    public static partial class StoreInitial_
    {
    
        private static StoreInitialDescriptor instance = new StoreInitialDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// 仓库,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}} 
        /// <summary>
        /// 商品,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 合格状态,
        /// </summary>
        public static PropertyExpression QualityStyleId { get{return instance.QualityStyleId;}} 
        /// <summary>
        /// 批号,
        /// </summary>
        public static PropertyExpression LotNo { get{return instance.LotNo;}} 
        /// <summary>
        /// 总数,
        /// </summary>
        public static PropertyExpression Quantity { get{return instance.Quantity;}}


 
        /// <summary>
        /// StoreInitial.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}} 
        /// <summary>
        /// StoreInitial.Store,
        /// </summary>
        public static StoreDescriptor Store { get{return instance.Store;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region StoreInitialDescriptor
    public partial class StoreInitialDescriptor:ObjectDescriptorBase
    {
     
        public StoreInitialDescriptor(string prefix):base(prefix)
        {  
    
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._QualityStyleId = new PropertyExpression(prefix + "QualityStyleId");
            this._LotNo = new PropertyExpression(prefix + "LotNo");
            this._Quantity = new PropertyExpression(prefix + "Quantity");
            ALL = new PropertyExpression[] {this._StoreId,this._ProductId,this._QualityStyleId,this._LotNo,this._Quantity};
        }
         

        private PropertyExpression _StoreId;
        /// <summary>
        /// 仓库,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// 商品,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _QualityStyleId;
        /// <summary>
        /// 合格状态,
        /// </summary>
        public PropertyExpression QualityStyleId { get{return _QualityStyleId;}}
        private PropertyExpression _LotNo;
        /// <summary>
        /// 批号,
        /// </summary>
        public PropertyExpression LotNo { get{return _LotNo;}}
        private PropertyExpression _Quantity;
        /// <summary>
        /// 总数,
        /// </summary>
        public PropertyExpression Quantity { get{return _Quantity;}}



        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
        private StoreDescriptor _Store;
        public StoreDescriptor Store 
        { 
            get
            {
                if(_Store==null) _Store=new StoreDescriptor(base.Prefix+"Store.");
                return _Store;
            }
        }
    }
     #endregion


    #region StoreInitials
    /// <summary>
    /// 期初库存设置,
    /// </summary>
    [Table]
    public partial class StoreInitials:EntityList<StoreInitial> 
    {
        
    }
    #endregion


    #region PurchaseOrderLine
    /// <summary>
    /// PurchaseOrderLine,
    /// </summary>
    [Table]
    public partial class PurchaseOrderLine 
    {
        
        public PurchaseOrderLine()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// PurchaseOrderLineId,
        /// </summary>
        [DisplayName("PurchaseOrderLineId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="PurchaseOrderLineId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long PurchaseOrderLineId {  get; set; }


        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        [DisplayName("PurchaseOrderId")]
        [Column()]
 
        public long? PurchaseOrderId {  get; set; }


        /// <summary>
        /// 数量,
        /// </summary>
        [DisplayName("数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="数量不允许空")]
 
        public decimal Quantity {  get; set; }


        /// <summary>
        /// 商品,
        /// </summary>
        [DisplayName("商品")]
        [Column()]
[Required(ErrorMessage="商品不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 商品名称,
        /// </summary>
        [DisplayName("商品名称")]
        [Column(Size = 100)]
[Required(ErrorMessage="商品名称不允许空")]
[MaxLength(100,ErrorMessage="商品名称不能超过100个字")]
 
        public string ProductName {  get; set; }


        /// <summary>
        /// 单位,
        /// </summary>
        [DisplayName("单位")]
        [Column(Size = 10)]
[Required(ErrorMessage="单位不允许空")]
[MaxLength(10,ErrorMessage="单位不能超过10个字")]
 
        public string Unit {  get; set; }


        /// <summary>
        /// 单价,
        /// </summary>
        [DisplayName("单价")]
        [Column(Size = 20)]
[Required(ErrorMessage="单价不允许空")]
 
        public decimal Price {  get; set; }


        /// <summary>
        /// 金额,
        /// </summary>
        [DisplayName("金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="金额不允许空")]
 
        public decimal Amount {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 商品编号,
        /// </summary>
        [DisplayName("商品编号")]
        [Column(Size = 30)]
[Required(ErrorMessage="商品编号不允许空")]
[MaxLength(30,ErrorMessage="商品编号不能超过30个字")]
 
        public string ProductNo {  get; set; }


        /// <summary>
        /// 条形码,
        /// </summary>
        [DisplayName("条形码")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="条形码不能超过30个字")]
 
        public string Barcode {  get; set; }


        /// <summary>
        /// 规格,
        /// </summary>
        [DisplayName("规格")]
        [Column(Size = 30)]
[MaxLength(30,ErrorMessage="规格不能超过30个字")]
 
        public string Spec {  get; set; }


        /// <summary>
        /// 批号,
        /// </summary>
        [DisplayName("批号")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="批号不能超过50个字")]
 
        public string LotNo {  get; set; }


        /// <summary>
        /// 实收数量,
        /// </summary>
        [DisplayName("实收数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="实收数量不允许空")]
 
        public decimal ActualQuantity {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// PurchaseOrderLine.PurchaseOrder,
        /// </summary>
        [Relation("this.PurchaseOrderId=out.PurchaseOrderId")]
        public PurchaseOrder PurchaseOrder { get;  set;  } 



        /// <summary>
        /// PurchaseOrderLine.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        #endregion
    }
    #endregion
    #region PurchaseOrderLineProperties
    public static partial class PurchaseOrderLine_
    {
    
        private static PurchaseOrderLineDescriptor instance = new PurchaseOrderLineDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// PurchaseOrderLineId,
        /// </summary>
        public static PropertyExpression PurchaseOrderLineId { get{return instance.PurchaseOrderLineId;}} 
        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        public static PropertyExpression PurchaseOrderId { get{return instance.PurchaseOrderId;}} 
        /// <summary>
        /// 数量,
        /// </summary>
        public static PropertyExpression Quantity { get{return instance.Quantity;}} 
        /// <summary>
        /// 商品,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 商品名称,
        /// </summary>
        public static PropertyExpression ProductName { get{return instance.ProductName;}} 
        /// <summary>
        /// 单位,
        /// </summary>
        public static PropertyExpression Unit { get{return instance.Unit;}} 
        /// <summary>
        /// 单价,
        /// </summary>
        public static PropertyExpression Price { get{return instance.Price;}} 
        /// <summary>
        /// 金额,
        /// </summary>
        public static PropertyExpression Amount { get{return instance.Amount;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 商品编号,
        /// </summary>
        public static PropertyExpression ProductNo { get{return instance.ProductNo;}} 
        /// <summary>
        /// 条形码,
        /// </summary>
        public static PropertyExpression Barcode { get{return instance.Barcode;}} 
        /// <summary>
        /// 规格,
        /// </summary>
        public static PropertyExpression Spec { get{return instance.Spec;}} 
        /// <summary>
        /// 批号,
        /// </summary>
        public static PropertyExpression LotNo { get{return instance.LotNo;}} 
        /// <summary>
        /// 实收数量,
        /// </summary>
        public static PropertyExpression ActualQuantity { get{return instance.ActualQuantity;}}


 
        /// <summary>
        /// PurchaseOrderLine.PurchaseOrder,
        /// </summary>
        public static PurchaseOrderDescriptor PurchaseOrder { get{return instance.PurchaseOrder;}} 
        /// <summary>
        /// PurchaseOrderLine.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PurchaseOrderLineDescriptor
    public partial class PurchaseOrderLineDescriptor:ObjectDescriptorBase
    {
     
        public PurchaseOrderLineDescriptor(string prefix):base(prefix)
        {  
    
            this._PurchaseOrderLineId = new PropertyExpression(prefix + "PurchaseOrderLineId");
            this._PurchaseOrderId = new PropertyExpression(prefix + "PurchaseOrderId");
            this._Quantity = new PropertyExpression(prefix + "Quantity");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._ProductName = new PropertyExpression(prefix + "ProductName");
            this._Unit = new PropertyExpression(prefix + "Unit");
            this._Price = new PropertyExpression(prefix + "Price");
            this._Amount = new PropertyExpression(prefix + "Amount");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._ProductNo = new PropertyExpression(prefix + "ProductNo");
            this._Barcode = new PropertyExpression(prefix + "Barcode");
            this._Spec = new PropertyExpression(prefix + "Spec");
            this._LotNo = new PropertyExpression(prefix + "LotNo");
            this._ActualQuantity = new PropertyExpression(prefix + "ActualQuantity");
            ALL = new PropertyExpression[] {this._PurchaseOrderLineId,this._PurchaseOrderId,this._Quantity,this._ProductId,this._ProductName,this._Unit,this._Price,this._Amount,this._Remark,this._ProductNo,this._Barcode,this._Spec,this._LotNo,this._ActualQuantity};
        }
         

        private PropertyExpression _PurchaseOrderLineId;
        /// <summary>
        /// PurchaseOrderLineId,
        /// </summary>
        public PropertyExpression PurchaseOrderLineId { get{return _PurchaseOrderLineId;}}
        private PropertyExpression _PurchaseOrderId;
        /// <summary>
        /// PurchaseOrderId,
        /// </summary>
        public PropertyExpression PurchaseOrderId { get{return _PurchaseOrderId;}}
        private PropertyExpression _Quantity;
        /// <summary>
        /// 数量,
        /// </summary>
        public PropertyExpression Quantity { get{return _Quantity;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// 商品,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _ProductName;
        /// <summary>
        /// 商品名称,
        /// </summary>
        public PropertyExpression ProductName { get{return _ProductName;}}
        private PropertyExpression _Unit;
        /// <summary>
        /// 单位,
        /// </summary>
        public PropertyExpression Unit { get{return _Unit;}}
        private PropertyExpression _Price;
        /// <summary>
        /// 单价,
        /// </summary>
        public PropertyExpression Price { get{return _Price;}}
        private PropertyExpression _Amount;
        /// <summary>
        /// 金额,
        /// </summary>
        public PropertyExpression Amount { get{return _Amount;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _ProductNo;
        /// <summary>
        /// 商品编号,
        /// </summary>
        public PropertyExpression ProductNo { get{return _ProductNo;}}
        private PropertyExpression _Barcode;
        /// <summary>
        /// 条形码,
        /// </summary>
        public PropertyExpression Barcode { get{return _Barcode;}}
        private PropertyExpression _Spec;
        /// <summary>
        /// 规格,
        /// </summary>
        public PropertyExpression Spec { get{return _Spec;}}
        private PropertyExpression _LotNo;
        /// <summary>
        /// 批号,
        /// </summary>
        public PropertyExpression LotNo { get{return _LotNo;}}
        private PropertyExpression _ActualQuantity;
        /// <summary>
        /// 实收数量,
        /// </summary>
        public PropertyExpression ActualQuantity { get{return _ActualQuantity;}}



        private PurchaseOrderDescriptor _PurchaseOrder;
        public PurchaseOrderDescriptor PurchaseOrder 
        { 
            get
            {
                if(_PurchaseOrder==null) _PurchaseOrder=new PurchaseOrderDescriptor(base.Prefix+"PurchaseOrder.");
                return _PurchaseOrder;
            }
        }
        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
    }
     #endregion


    #region PurchaseOrderLines
    /// <summary>
    /// PurchaseOrderLine,
    /// </summary>
    [Table]
    public partial class PurchaseOrderLines:EntityList<PurchaseOrderLine> 
    {
        
    }
    #endregion


    #region InventoryOrder
    /// <summary>
    /// 盘存单,盘存单
    /// </summary>
    [Table]
    public partial class InventoryOrder 
    {
        
        public InventoryOrder()
        {

            CreateTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        [DisplayName("InventoryOrderId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="InventoryOrderId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long InventoryOrderId {  get; set; }


        /// <summary>
        /// 盘存单号,
        /// </summary>
        [DisplayName("盘存单号")]
        [Column(Size = 30)]
[Required(ErrorMessage="盘存单号不允许空")]
[MaxLength(30,ErrorMessage="盘存单号不能超过30个字")]
 
        public string InventoryOrderNo {  get; set; }


        /// <summary>
        /// 所属公司,
        /// </summary>
        [DisplayName("所属公司")]
        [Column()]
[Required(ErrorMessage="所属公司不允许空")]
 
        public long CompanyId {  get; set; }


        /// <summary>
        /// 创建时间,
        /// </summary>
        [DisplayName("创建时间")]
        [Column()]
[Required(ErrorMessage="创建时间不允许空")]
 
        public DateTime CreateTime {  get; set; }


        /// <summary>
        /// 仓管员,
        /// </summary>
        [DisplayName("仓管员")]
        [Column()]
[Required(ErrorMessage="仓管员不允许空")]
 
        public long OrderEmployeeId {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        [DisplayName("是否草稿订单")]
        [Column()]
[Required(ErrorMessage="是否草稿订单不允许空")]
 
        public bool IsDraft {  get; set; }


        /// <summary>
        /// 是否结束,
        /// </summary>
        [DisplayName("是否结束")]
        [Column()]
[Required(ErrorMessage="是否结束不允许空")]
 
        public bool IsCompleted {  get; set; }


        /// <summary>
        /// 仓库,
        /// </summary>
        [DisplayName("仓库")]
        [Column()]
[Required(ErrorMessage="仓库不允许空")]
 
        public long StoreId {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// InventoryOrder.Company,
        /// </summary>
        [Relation("this.CompanyId=out.CompanyId")]
        public Company Company { get;  set;  } 



        /// <summary>
        /// InventoryOrder.Store,
        /// </summary>
        [Relation("this.StoreId=out.StoreId")]
        public Store Store { get;  set;  } 



        /// <summary>
        /// InventoryOrder.OrderEmployee,
        /// </summary>
        [Relation("this.OrderEmployeeId=out.EmployeeId")]
        public Employee OrderEmployee { get;  set;  } 



        #endregion
    }
    #endregion
    #region InventoryOrderProperties
    public static partial class InventoryOrder_
    {
    
        private static InventoryOrderDescriptor instance = new InventoryOrderDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        public static PropertyExpression InventoryOrderId { get{return instance.InventoryOrderId;}} 
        /// <summary>
        /// 盘存单号,
        /// </summary>
        public static PropertyExpression InventoryOrderNo { get{return instance.InventoryOrderNo;}} 
        /// <summary>
        /// 所属公司,
        /// </summary>
        public static PropertyExpression CompanyId { get{return instance.CompanyId;}} 
        /// <summary>
        /// 创建时间,
        /// </summary>
        public static PropertyExpression CreateTime { get{return instance.CreateTime;}} 
        /// <summary>
        /// 仓管员,
        /// </summary>
        public static PropertyExpression OrderEmployeeId { get{return instance.OrderEmployeeId;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public static PropertyExpression IsDraft { get{return instance.IsDraft;}} 
        /// <summary>
        /// 是否结束,
        /// </summary>
        public static PropertyExpression IsCompleted { get{return instance.IsCompleted;}} 
        /// <summary>
        /// 仓库,
        /// </summary>
        public static PropertyExpression StoreId { get{return instance.StoreId;}}


 
        /// <summary>
        /// InventoryOrder.Company,
        /// </summary>
        public static CompanyDescriptor Company { get{return instance.Company;}} 
        /// <summary>
        /// InventoryOrder.Store,
        /// </summary>
        public static StoreDescriptor Store { get{return instance.Store;}} 
        /// <summary>
        /// InventoryOrder.OrderEmployee,
        /// </summary>
        public static EmployeeDescriptor OrderEmployee { get{return instance.OrderEmployee;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region InventoryOrderDescriptor
    public partial class InventoryOrderDescriptor:ObjectDescriptorBase
    {
     
        public InventoryOrderDescriptor(string prefix):base(prefix)
        {  
    
            this._InventoryOrderId = new PropertyExpression(prefix + "InventoryOrderId");
            this._InventoryOrderNo = new PropertyExpression(prefix + "InventoryOrderNo");
            this._CompanyId = new PropertyExpression(prefix + "CompanyId");
            this._CreateTime = new PropertyExpression(prefix + "CreateTime");
            this._OrderEmployeeId = new PropertyExpression(prefix + "OrderEmployeeId");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._IsDraft = new PropertyExpression(prefix + "IsDraft");
            this._IsCompleted = new PropertyExpression(prefix + "IsCompleted");
            this._StoreId = new PropertyExpression(prefix + "StoreId");
            ALL = new PropertyExpression[] {this._InventoryOrderId,this._InventoryOrderNo,this._CompanyId,this._CreateTime,this._OrderEmployeeId,this._Remark,this._IsDraft,this._IsCompleted,this._StoreId};
        }
         

        private PropertyExpression _InventoryOrderId;
        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        public PropertyExpression InventoryOrderId { get{return _InventoryOrderId;}}
        private PropertyExpression _InventoryOrderNo;
        /// <summary>
        /// 盘存单号,
        /// </summary>
        public PropertyExpression InventoryOrderNo { get{return _InventoryOrderNo;}}
        private PropertyExpression _CompanyId;
        /// <summary>
        /// 所属公司,
        /// </summary>
        public PropertyExpression CompanyId { get{return _CompanyId;}}
        private PropertyExpression _CreateTime;
        /// <summary>
        /// 创建时间,
        /// </summary>
        public PropertyExpression CreateTime { get{return _CreateTime;}}
        private PropertyExpression _OrderEmployeeId;
        /// <summary>
        /// 仓管员,
        /// </summary>
        public PropertyExpression OrderEmployeeId { get{return _OrderEmployeeId;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _IsDraft;
        /// <summary>
        /// 是否草稿订单,
        /// </summary>
        public PropertyExpression IsDraft { get{return _IsDraft;}}
        private PropertyExpression _IsCompleted;
        /// <summary>
        /// 是否结束,
        /// </summary>
        public PropertyExpression IsCompleted { get{return _IsCompleted;}}
        private PropertyExpression _StoreId;
        /// <summary>
        /// 仓库,
        /// </summary>
        public PropertyExpression StoreId { get{return _StoreId;}}



        private CompanyDescriptor _Company;
        public CompanyDescriptor Company 
        { 
            get
            {
                if(_Company==null) _Company=new CompanyDescriptor(base.Prefix+"Company.");
                return _Company;
            }
        }
        private StoreDescriptor _Store;
        public StoreDescriptor Store 
        { 
            get
            {
                if(_Store==null) _Store=new StoreDescriptor(base.Prefix+"Store.");
                return _Store;
            }
        }
        private EmployeeDescriptor _OrderEmployee;
        public EmployeeDescriptor OrderEmployee 
        { 
            get
            {
                if(_OrderEmployee==null) _OrderEmployee=new EmployeeDescriptor(base.Prefix+"OrderEmployee.");
                return _OrderEmployee;
            }
        }
    }
     #endregion


    #region InventoryOrders
    /// <summary>
    /// 盘存单,盘存单
    /// </summary>
    [Table]
    public partial class InventoryOrders:EntityList<InventoryOrder> 
    {
        
    }
    #endregion


    #region InventoryOrderLine
    /// <summary>
    /// InventoryOrderLine,盘存单行
    /// </summary>
    [Table]
    public partial class InventoryOrderLine 
    {
        
        public InventoryOrderLine()
        {

        
        }
        #region propertys
        
        /// <summary>
        /// InventoryOrderLineId,
        /// </summary>
        [DisplayName("InventoryOrderLineId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="InventoryOrderLineId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long InventoryOrderLineId {  get; set; }


        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        [DisplayName("InventoryOrderId")]
        [Column()]
[Required(ErrorMessage="InventoryOrderId不允许空")]
 
        public long InventoryOrderId {  get; set; }


        /// <summary>
        /// 数量,
        /// </summary>
        [DisplayName("数量")]
        [Column(Size = 20)]
[Required(ErrorMessage="数量不允许空")]
 
        public decimal Quantity {  get; set; }


        /// <summary>
        /// 商品,
        /// </summary>
        [DisplayName("商品")]
        [Column()]
[Required(ErrorMessage="商品不允许空")]
 
        public long ProductId {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        /// <summary>
        /// 商品编号,
        /// </summary>
        [DisplayName("商品编号")]
        [Column(Size = 30)]
[Required(ErrorMessage="商品编号不允许空")]
[MaxLength(30,ErrorMessage="商品编号不能超过30个字")]
 
        public string ProductNo {  get; set; }


        /// <summary>
        /// 批号,
        /// </summary>
        [DisplayName("批号")]
        [Column(Size = 50)]
[MaxLength(50,ErrorMessage="批号不能超过50个字")]
 
        public string LotNo {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// InventoryOrderLine.InventoryOrder,
        /// </summary>
        [Relation("this.InventoryOrderId=out.InventoryOrderId")]
        public InventoryOrder InventoryOrder { get;  set;  } 



        /// <summary>
        /// InventoryOrderLine.Product,
        /// </summary>
        [Relation("this.ProductId=out.ProductId")]
        public Product Product { get;  set;  } 



        #endregion
    }
    #endregion
    #region InventoryOrderLineProperties
    public static partial class InventoryOrderLine_
    {
    
        private static InventoryOrderLineDescriptor instance = new InventoryOrderLineDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// InventoryOrderLineId,
        /// </summary>
        public static PropertyExpression InventoryOrderLineId { get{return instance.InventoryOrderLineId;}} 
        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        public static PropertyExpression InventoryOrderId { get{return instance.InventoryOrderId;}} 
        /// <summary>
        /// 数量,
        /// </summary>
        public static PropertyExpression Quantity { get{return instance.Quantity;}} 
        /// <summary>
        /// 商品,
        /// </summary>
        public static PropertyExpression ProductId { get{return instance.ProductId;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}} 
        /// <summary>
        /// 商品编号,
        /// </summary>
        public static PropertyExpression ProductNo { get{return instance.ProductNo;}} 
        /// <summary>
        /// 批号,
        /// </summary>
        public static PropertyExpression LotNo { get{return instance.LotNo;}}


 
        /// <summary>
        /// InventoryOrderLine.InventoryOrder,
        /// </summary>
        public static InventoryOrderDescriptor InventoryOrder { get{return instance.InventoryOrder;}} 
        /// <summary>
        /// InventoryOrderLine.Product,
        /// </summary>
        public static ProductDescriptor Product { get{return instance.Product;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region InventoryOrderLineDescriptor
    public partial class InventoryOrderLineDescriptor:ObjectDescriptorBase
    {
     
        public InventoryOrderLineDescriptor(string prefix):base(prefix)
        {  
    
            this._InventoryOrderLineId = new PropertyExpression(prefix + "InventoryOrderLineId");
            this._InventoryOrderId = new PropertyExpression(prefix + "InventoryOrderId");
            this._Quantity = new PropertyExpression(prefix + "Quantity");
            this._ProductId = new PropertyExpression(prefix + "ProductId");
            this._Remark = new PropertyExpression(prefix + "Remark");
            this._ProductNo = new PropertyExpression(prefix + "ProductNo");
            this._LotNo = new PropertyExpression(prefix + "LotNo");
            ALL = new PropertyExpression[] {this._InventoryOrderLineId,this._InventoryOrderId,this._Quantity,this._ProductId,this._Remark,this._ProductNo,this._LotNo};
        }
         

        private PropertyExpression _InventoryOrderLineId;
        /// <summary>
        /// InventoryOrderLineId,
        /// </summary>
        public PropertyExpression InventoryOrderLineId { get{return _InventoryOrderLineId;}}
        private PropertyExpression _InventoryOrderId;
        /// <summary>
        /// InventoryOrderId,
        /// </summary>
        public PropertyExpression InventoryOrderId { get{return _InventoryOrderId;}}
        private PropertyExpression _Quantity;
        /// <summary>
        /// 数量,
        /// </summary>
        public PropertyExpression Quantity { get{return _Quantity;}}
        private PropertyExpression _ProductId;
        /// <summary>
        /// 商品,
        /// </summary>
        public PropertyExpression ProductId { get{return _ProductId;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}
        private PropertyExpression _ProductNo;
        /// <summary>
        /// 商品编号,
        /// </summary>
        public PropertyExpression ProductNo { get{return _ProductNo;}}
        private PropertyExpression _LotNo;
        /// <summary>
        /// 批号,
        /// </summary>
        public PropertyExpression LotNo { get{return _LotNo;}}



        private InventoryOrderDescriptor _InventoryOrder;
        public InventoryOrderDescriptor InventoryOrder 
        { 
            get
            {
                if(_InventoryOrder==null) _InventoryOrder=new InventoryOrderDescriptor(base.Prefix+"InventoryOrder.");
                return _InventoryOrder;
            }
        }
        private ProductDescriptor _Product;
        public ProductDescriptor Product 
        { 
            get
            {
                if(_Product==null) _Product=new ProductDescriptor(base.Prefix+"Product.");
                return _Product;
            }
        }
    }
     #endregion


    #region InventoryOrderLines
    /// <summary>
    /// InventoryOrderLine,盘存单行
    /// </summary>
    [Table]
    public partial class InventoryOrderLines:EntityList<InventoryOrderLine> 
    {
        
    }
    #endregion


    #region PurchaseOrderCapital
    /// <summary>
    /// PurchaseOrderCapital,客户资金流水
    /// </summary>
    [Table]
    public partial class PurchaseOrderCapital 
    {
        
        public PurchaseOrderCapital()
        {

            CapitalTime=DateTime.Now;
        
        }
        #region propertys
        
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        [DisplayName("SalesOrderCapitalId")]
        [Column(IsPrimaryKey = true)]
[Required(ErrorMessage="SalesOrderCapitalId不允许空")]
 
        [MySqlColumn(IsIdentity=true)] 
        public long PurchaseOrderCapitalId {  get; set; }


        /// <summary>
        /// 金额,
        /// </summary>
        [DisplayName("金额")]
        [Column(Size = 20)]
[Required(ErrorMessage="金额不允许空")]
 
        public decimal Amount {  get; set; }


        /// <summary>
        /// 收款时间,
        /// </summary>
        [DisplayName("收款时间")]
        [Column()]
[Required(ErrorMessage="收款时间不允许空")]
 
        public DateTime CapitalTime {  get; set; }


        /// <summary>
        /// 支付方式,
        /// </summary>
        [DisplayName("支付方式")]
        [Column()]
[Required(ErrorMessage="支付方式不允许空")]
 
        public long PaymentTypeId {  get; set; }


        /// <summary>
        /// 收款负责人,
        /// </summary>
        [DisplayName("收款负责人")]
        [Column()]
[Required(ErrorMessage="收款负责人不允许空")]
 
        public long CapitalEmployeeId {  get; set; }


        /// <summary>
        /// 关联订单,
        /// </summary>
        [DisplayName("关联订单")]
        [Column()]
[Required(ErrorMessage="关联订单不允许空")]
 
        public long PurchaseOrderId {  get; set; }


        /// <summary>
        /// 备注,
        /// </summary>
        [DisplayName("备注")]
        [Column(Size = 200)]
[MaxLength(200,ErrorMessage="备注不能超过200个字")]
 
        public string Remark {  get; set; }


        #endregion

        #region link objects
        
        /// <summary>
        /// PurchaseOrderCapital.CapitalEmployee,
        /// </summary>
        [Relation("this.CapitalEmployeeId=out.EmployeeId")]
        public Employee CapitalEmployee { get;  set;  } 



        /// <summary>
        /// PurchaseOrderCapital.PurchaseOrder,
        /// </summary>
        [Relation("this.PurchaseOrderId=out.PurchaseOrderId")]
        public PurchaseOrder PurchaseOrder { get;  set;  } 



        /// <summary>
        /// PurchaseOrderCapital.PaymentType,
        /// </summary>
        [Relation("this.PaymentTypeId=out.PaymentTypeId")]
        public PaymentType PaymentType { get;  set;  } 



        #endregion
    }
    #endregion
    #region PurchaseOrderCapitalProperties
    public static partial class PurchaseOrderCapital_
    {
    
        private static PurchaseOrderCapitalDescriptor instance = new PurchaseOrderCapitalDescriptor(""); 
        
        /// <summary>
        /// 全部字段
        /// </summary>
        public static PropertyExpression[] ALL { get{return instance.ALL;}}

 
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        public static PropertyExpression PurchaseOrderCapitalId { get{return instance.PurchaseOrderCapitalId;}} 
        /// <summary>
        /// 金额,
        /// </summary>
        public static PropertyExpression Amount { get{return instance.Amount;}} 
        /// <summary>
        /// 收款时间,
        /// </summary>
        public static PropertyExpression CapitalTime { get{return instance.CapitalTime;}} 
        /// <summary>
        /// 支付方式,
        /// </summary>
        public static PropertyExpression PaymentTypeId { get{return instance.PaymentTypeId;}} 
        /// <summary>
        /// 收款负责人,
        /// </summary>
        public static PropertyExpression CapitalEmployeeId { get{return instance.CapitalEmployeeId;}} 
        /// <summary>
        /// 关联订单,
        /// </summary>
        public static PropertyExpression PurchaseOrderId { get{return instance.PurchaseOrderId;}} 
        /// <summary>
        /// 备注,
        /// </summary>
        public static PropertyExpression Remark { get{return instance.Remark;}}


 
        /// <summary>
        /// PurchaseOrderCapital.CapitalEmployee,
        /// </summary>
        public static EmployeeDescriptor CapitalEmployee { get{return instance.CapitalEmployee;}} 
        /// <summary>
        /// PurchaseOrderCapital.PurchaseOrder,
        /// </summary>
        public static PurchaseOrderDescriptor PurchaseOrder { get{return instance.PurchaseOrder;}} 
        /// <summary>
        /// PurchaseOrderCapital.PaymentType,
        /// </summary>
        public static PaymentTypeDescriptor PaymentType { get{return instance.PaymentType;}}

        public static IEnumerable<PropertyExpression> Exclude(params PropertyExpression[] properties)
        {
            return instance.Exclude(properties);
        }

    }
     #endregion
    #region PurchaseOrderCapitalDescriptor
    public partial class PurchaseOrderCapitalDescriptor:ObjectDescriptorBase
    {
     
        public PurchaseOrderCapitalDescriptor(string prefix):base(prefix)
        {  
    
            this._PurchaseOrderCapitalId = new PropertyExpression(prefix + "PurchaseOrderCapitalId");
            this._Amount = new PropertyExpression(prefix + "Amount");
            this._CapitalTime = new PropertyExpression(prefix + "CapitalTime");
            this._PaymentTypeId = new PropertyExpression(prefix + "PaymentTypeId");
            this._CapitalEmployeeId = new PropertyExpression(prefix + "CapitalEmployeeId");
            this._PurchaseOrderId = new PropertyExpression(prefix + "PurchaseOrderId");
            this._Remark = new PropertyExpression(prefix + "Remark");
            ALL = new PropertyExpression[] {this._PurchaseOrderCapitalId,this._Amount,this._CapitalTime,this._PaymentTypeId,this._CapitalEmployeeId,this._PurchaseOrderId,this._Remark};
        }
         

        private PropertyExpression _PurchaseOrderCapitalId;
        /// <summary>
        /// SalesOrderCapitalId,
        /// </summary>
        public PropertyExpression PurchaseOrderCapitalId { get{return _PurchaseOrderCapitalId;}}
        private PropertyExpression _Amount;
        /// <summary>
        /// 金额,
        /// </summary>
        public PropertyExpression Amount { get{return _Amount;}}
        private PropertyExpression _CapitalTime;
        /// <summary>
        /// 收款时间,
        /// </summary>
        public PropertyExpression CapitalTime { get{return _CapitalTime;}}
        private PropertyExpression _PaymentTypeId;
        /// <summary>
        /// 支付方式,
        /// </summary>
        public PropertyExpression PaymentTypeId { get{return _PaymentTypeId;}}
        private PropertyExpression _CapitalEmployeeId;
        /// <summary>
        /// 收款负责人,
        /// </summary>
        public PropertyExpression CapitalEmployeeId { get{return _CapitalEmployeeId;}}
        private PropertyExpression _PurchaseOrderId;
        /// <summary>
        /// 关联订单,
        /// </summary>
        public PropertyExpression PurchaseOrderId { get{return _PurchaseOrderId;}}
        private PropertyExpression _Remark;
        /// <summary>
        /// 备注,
        /// </summary>
        public PropertyExpression Remark { get{return _Remark;}}



        private EmployeeDescriptor _CapitalEmployee;
        public EmployeeDescriptor CapitalEmployee 
        { 
            get
            {
                if(_CapitalEmployee==null) _CapitalEmployee=new EmployeeDescriptor(base.Prefix+"CapitalEmployee.");
                return _CapitalEmployee;
            }
        }
        private PurchaseOrderDescriptor _PurchaseOrder;
        public PurchaseOrderDescriptor PurchaseOrder 
        { 
            get
            {
                if(_PurchaseOrder==null) _PurchaseOrder=new PurchaseOrderDescriptor(base.Prefix+"PurchaseOrder.");
                return _PurchaseOrder;
            }
        }
        private PaymentTypeDescriptor _PaymentType;
        public PaymentTypeDescriptor PaymentType 
        { 
            get
            {
                if(_PaymentType==null) _PaymentType=new PaymentTypeDescriptor(base.Prefix+"PaymentType.");
                return _PaymentType;
            }
        }
    }
     #endregion


    #region PurchaseOrderCapitals
    /// <summary>
    /// PurchaseOrderCapital,客户资金流水
    /// </summary>
    [Table]
    public partial class PurchaseOrderCapitals:EntityList<PurchaseOrderCapital> 
    {
        
    }
    #endregion
}
